docs: update readme

This commit is contained in:
Bo-Yi Wu 2019-09-28 12:16:21 +08:00
parent c0a815a115
commit d322577e98
2 changed files with 23 additions and 35 deletions

View File

@ -19,11 +19,10 @@ jobs:
- name: copy file via ssh key - name: copy file via ssh key
uses: appleboy/scp-action@master uses: appleboy/scp-action@master
env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.KEY }}
with: with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
source: "tests/a.txt,tests/b.txt" source: "tests/a.txt,tests/b.txt"
target: "test" target: "test"

View File

@ -11,25 +11,30 @@ copy files and artifacts via SSH as blow.
```yaml ```yaml
- name: copy file via ssh password - name: copy file via ssh password
uses: appleboy/scp-action@master uses: appleboy/scp-action@master
env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
PORT: ${{ secrets.PORT }}
with: with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
source: "tests/a.txt,tests/b.txt" source: "tests/a.txt,tests/b.txt"
target: "test target: "test"
``` ```
## Environment variables ## Input variables
* HOST - ssh server host see the [action.yml](./action.yml) file for more detail imformation.
* PORT - ssh server port
* USERNAME - ssh server username * host - scp remote host
* PASSWORD - ssh server password * port - scp remote port
* KEY - ssh server private key * username - scp username
* TARGET - target folder * password - scp password
* SOURCE - scp file list * timeout - timeout for ssh to remote host
* command_timeout - timeout for scp command
* key - content of ssh private key. ex raw content of ~/.ssh/id_rsa
* key_path - path of ssh private key
* target - target path on the server
* source - scp file list
* rm - remove target folder before upload data
### Example ### Example
@ -91,19 +96,3 @@ Example configuration for multiple server
source: "tests/a.txt,tests/b.txt" source: "tests/a.txt,tests/b.txt"
target: "test" target: "test"
``` ```
## Input variables
see the [action.yml](./action.yml) file for more detail imformation.
* host - scp remote host
* port - scp remote port
* username - scp username
* password - scp password
* timeout - timeout for ssh to remote host
* command_timeout - timeout for scp command
* key - content of ssh private key. ex raw content of ~/.ssh/id_rsa
* key_path - path of ssh private key
* target - target path on the server
* source - scp file list
* rm - remove target folder before upload data