Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					209e8c05e0 | ||
| 
						 | 
					e0dbae8ff0 | ||
| 
						 | 
					3e84ad0651 | 
@@ -1,4 +1,4 @@
 | 
				
			|||||||
FROM ghcr.io/appleboy/drone-scp:1.6.7
 | 
					FROM ghcr.io/appleboy/drone-scp:latest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY entrypoint.sh /entrypoint.sh
 | 
					COPY entrypoint.sh /entrypoint.sh
 | 
				
			||||||
RUN chmod +x /entrypoint.sh
 | 
					RUN chmod +x /entrypoint.sh
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										42
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								README.md
									
									
									
									
									
								
							@@ -19,16 +19,16 @@ jobs:
 | 
				
			|||||||
    name: Build
 | 
					    name: Build
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@master
 | 
					    - uses: actions/checkout@v0.1.4
 | 
				
			||||||
    - name: copy file via ssh password
 | 
					    - name: copy file via ssh password
 | 
				
			||||||
      uses: appleboy/scp-action@master
 | 
					      uses: appleboy/scp-action@v0.1.4
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        host: ${{ secrets.HOST }}
 | 
					        host: ${{ secrets.HOST }}
 | 
				
			||||||
        username: ${{ secrets.USERNAME }}
 | 
					        username: ${{ secrets.USERNAME }}
 | 
				
			||||||
        password: ${{ secrets.PASSWORD }}
 | 
					        password: ${{ secrets.PASSWORD }}
 | 
				
			||||||
        port: ${{ secrets.PORT }}
 | 
					        port: ${{ secrets.PORT }}
 | 
				
			||||||
        source: "tests/a.txt,tests/b.txt"
 | 
					        source: "tests/a.txt,tests/b.txt"
 | 
				
			||||||
        target: "test"
 | 
					        target: your_server_target_folder_path
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Input variables
 | 
					## Input variables
 | 
				
			||||||
@@ -137,48 +137,48 @@ Copy file via a SSH password:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
- name: copy file via ssh password
 | 
					- name: copy file via ssh password
 | 
				
			||||||
  uses: appleboy/scp-action@master
 | 
					  uses: appleboy/scp-action@v0.1.4
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    host: example.com
 | 
					    host: example.com
 | 
				
			||||||
    username: foo
 | 
					    username: foo
 | 
				
			||||||
    password: bar
 | 
					    password: bar
 | 
				
			||||||
    port: 22
 | 
					    port: 22
 | 
				
			||||||
    source: "tests/a.txt,tests/b.txt"
 | 
					    source: "tests/a.txt,tests/b.txt"
 | 
				
			||||||
    target: "test"
 | 
					    target: your_server_target_folder_path
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Copy file via a SSH key:
 | 
					Copy file via a SSH key:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
- name: copy file via ssh key
 | 
					- name: copy file via ssh key
 | 
				
			||||||
  uses: appleboy/scp-action@master
 | 
					  uses: appleboy/scp-action@v0.1.4
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    host: ${{ secrets.HOST }}
 | 
					    host: ${{ secrets.HOST }}
 | 
				
			||||||
    username: ${{ secrets.USERNAME }}
 | 
					    username: ${{ secrets.USERNAME }}
 | 
				
			||||||
    port: ${{ secrets.PORT }}
 | 
					    port: ${{ secrets.PORT }}
 | 
				
			||||||
    key: ${{ secrets.KEY }}
 | 
					    key: ${{ secrets.KEY }}
 | 
				
			||||||
    source: "tests/a.txt,tests/b.txt"
 | 
					    source: "tests/a.txt,tests/b.txt"
 | 
				
			||||||
    target: "test"
 | 
					    target: your_server_target_folder_path
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Example configuration for ignore list:
 | 
					Example configuration for ignore list:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
- name: copy file via ssh key
 | 
					- name: copy file via ssh key
 | 
				
			||||||
  uses: appleboy/scp-action@master
 | 
					  uses: appleboy/scp-action@v0.1.4
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    host: ${{ secrets.HOST }}
 | 
					    host: ${{ secrets.HOST }}
 | 
				
			||||||
    username: ${{ secrets.USERNAME }}
 | 
					    username: ${{ secrets.USERNAME }}
 | 
				
			||||||
    port: ${{ secrets.PORT }}
 | 
					    port: ${{ secrets.PORT }}
 | 
				
			||||||
    key: ${{ secrets.KEY }}
 | 
					    key: ${{ secrets.KEY }}
 | 
				
			||||||
    source: "tests/*.txt,!tests/a.txt"
 | 
					    source: "tests/*.txt,!tests/a.txt"
 | 
				
			||||||
    target: "test"
 | 
					    target: your_server_target_folder_path
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Example configuration for multiple servers:
 | 
					Example configuration for multiple servers:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```diff
 | 
					```diff
 | 
				
			||||||
  uses: appleboy/scp-action@master
 | 
					  uses: appleboy/scp-action@v0.1.4
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
-   host: "example.com"
 | 
					-   host: "example.com"
 | 
				
			||||||
+   host: "foo.com,bar.com"
 | 
					+   host: "foo.com,bar.com"
 | 
				
			||||||
@@ -186,13 +186,13 @@ Example configuration for multiple servers:
 | 
				
			|||||||
    password: bar
 | 
					    password: bar
 | 
				
			||||||
    port: 22
 | 
					    port: 22
 | 
				
			||||||
    source: "tests/a.txt,tests/b.txt"
 | 
					    source: "tests/a.txt,tests/b.txt"
 | 
				
			||||||
    target: "test"
 | 
					    target: your_server_target_folder_path
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Example configuration for exclude custom files:
 | 
					Example configuration for exclude custom files:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
  uses: appleboy/scp-action@master
 | 
					  uses: appleboy/scp-action@v0.1.4
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    host: "example.com"
 | 
					    host: "example.com"
 | 
				
			||||||
    username: foo
 | 
					    username: foo
 | 
				
			||||||
@@ -200,7 +200,7 @@ Example configuration for exclude custom files:
 | 
				
			|||||||
    port: 22
 | 
					    port: 22
 | 
				
			||||||
-   source: "tests/*.txt"
 | 
					-   source: "tests/*.txt"
 | 
				
			||||||
+   source: "tests/*.txt,!tests/a.txt,!tests/b.txt"
 | 
					+   source: "tests/*.txt,!tests/a.txt,!tests/b.txt"
 | 
				
			||||||
    target: "test"
 | 
					    target: your_server_target_folder_path
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Upload artifact files to remote server:
 | 
					Upload artifact files to remote server:
 | 
				
			||||||
@@ -226,28 +226,28 @@ Upload artifact files to remote server:
 | 
				
			|||||||
        path: distfiles
 | 
					        path: distfiles
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: copy file to server
 | 
					    - name: copy file to server
 | 
				
			||||||
      uses: appleboy/scp-action@master
 | 
					      uses: appleboy/scp-action@v0.1.4
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        host: ${{ secrets.HOST }}
 | 
					        host: ${{ secrets.HOST }}
 | 
				
			||||||
        username: ${{ secrets.USERNAME }}
 | 
					        username: ${{ secrets.USERNAME }}
 | 
				
			||||||
        key: ${{ secrets.KEY }}
 | 
					        key: ${{ secrets.KEY }}
 | 
				
			||||||
        port: ${{ secrets.PORT }}
 | 
					        port: ${{ secrets.PORT }}
 | 
				
			||||||
        source: distfiles/*
 | 
					        source: distfiles/*
 | 
				
			||||||
        target: test
 | 
					        target: your_server_target_folder_path
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Remove the specified number of leading path elements:
 | 
					Remove the specified number of leading path elements:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
- name: remove the specified number of leading path elements
 | 
					- name: remove the specified number of leading path elements
 | 
				
			||||||
  uses: appleboy/scp-action@master
 | 
					  uses: appleboy/scp-action@v0.1.4
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    host: ${{ secrets.HOST }}
 | 
					    host: ${{ secrets.HOST }}
 | 
				
			||||||
    username: ${{ secrets.USERNAME }}
 | 
					    username: ${{ secrets.USERNAME }}
 | 
				
			||||||
    key: ${{ secrets.KEY }}
 | 
					    key: ${{ secrets.KEY }}
 | 
				
			||||||
    port: ${{ secrets.PORT }}
 | 
					    port: ${{ secrets.PORT }}
 | 
				
			||||||
    source: "tests/a.txt,tests/b.txt"
 | 
					    source: "tests/a.txt,tests/b.txt"
 | 
				
			||||||
    target: "foobar"
 | 
					    target: your_server_target_folder_path
 | 
				
			||||||
    strip_components: 1
 | 
					    strip_components: 1
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -269,14 +269,14 @@ Only copy files that are newer than the corresponding destination files:
 | 
				
			|||||||
        separator: ","
 | 
					        separator: ","
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: copy file to server
 | 
					    - name: copy file to server
 | 
				
			||||||
      uses: appleboy/scp-action@master
 | 
					      uses: appleboy/scp-action@v0.1.4
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        host: ${{ secrets.HOST }}
 | 
					        host: ${{ secrets.HOST }}
 | 
				
			||||||
        username: ${{ secrets.USERNAME }}
 | 
					        username: ${{ secrets.USERNAME }}
 | 
				
			||||||
        key: ${{ secrets.KEY }}
 | 
					        key: ${{ secrets.KEY }}
 | 
				
			||||||
        port: ${{ secrets.PORT }}
 | 
					        port: ${{ secrets.PORT }}
 | 
				
			||||||
        source: ${{ steps.changed-files.outputs.all_changed_files }}
 | 
					        source: ${{ steps.changed-files.outputs.all_changed_files }}
 | 
				
			||||||
        target: test
 | 
					        target: your_server_target_folder_path
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Old target structure:
 | 
					Old target structure:
 | 
				
			||||||
@@ -300,7 +300,7 @@ Protecting a Private Key. The purpose of the passphrase is usually to encrypt th
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
```diff
 | 
					```diff
 | 
				
			||||||
  - name: ssh key with passphrase
 | 
					  - name: ssh key with passphrase
 | 
				
			||||||
    uses: appleboy/scp-action@master
 | 
					    uses: appleboy/scp-action@v0.1.4
 | 
				
			||||||
    with:
 | 
					    with:
 | 
				
			||||||
      host: ${{ secrets.HOST }}
 | 
					      host: ${{ secrets.HOST }}
 | 
				
			||||||
      username: ${{ secrets.USERNAME }}
 | 
					      username: ${{ secrets.USERNAME }}
 | 
				
			||||||
@@ -308,5 +308,5 @@ Protecting a Private Key. The purpose of the passphrase is usually to encrypt th
 | 
				
			|||||||
+     passphrase: ${{ secrets.PASSPHRASE }}
 | 
					+     passphrase: ${{ secrets.PASSPHRASE }}
 | 
				
			||||||
      port: ${{ secrets.PORT }}
 | 
					      port: ${{ secrets.PORT }}
 | 
				
			||||||
      source: "tests/a.txt,tests/b.txt"
 | 
					      source: "tests/a.txt,tests/b.txt"
 | 
				
			||||||
      target: "test"
 | 
					      target: your_server_target_folder_path
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user