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