7 Commits

Author SHA1 Message Date
Bo-Yi Wu
a5de8af6d5 chore: update default timeout to 10 minutes
Some checks failed
scp files / Build (push) Failing after 4s
2019-11-30 23:17:05 +08:00
Bo-Yi Wu
671c934c80 Update README.md 2019-09-30 21:52:10 +08:00
Bo-Yi Wu
8da6e3d335 update docs
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-09-30 16:59:44 +08:00
Bo-Yi Wu
196ea3f88f chore(scp): default port is 22
Some checks failed
scp files / Build (push) Failing after 4s
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-09-30 16:58:33 +08:00
Bo-Yi Wu
034b0ad00c Update README.md 2019-09-30 11:38:02 +08:00
Bo-Yi Wu
95e250284b docs: update readme 2019-09-29 14:16:22 +08:00
Bo-Yi Wu
a593d18cb8 docs: add default value of timeout 2019-09-29 01:45:56 +08:00
3 changed files with 25 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
FROM appleboy/drone-scp:1.5.3-linux-amd64 FROM appleboy/drone-scp:1.5.4-linux-amd64
ADD entrypoint.sh /entrypoint.sh ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh RUN chmod +x /entrypoint.sh

View File

@@ -1,6 +1,6 @@
# 🚀 SCP for GitHub Actions # 🚀 SCP for GitHub Actions
[GitHub Action](https://developer.github.com/actions/) for copying files and artifacts via SSH. [GitHub Action](https://github.com/features/actions) for copying files and artifacts via SSH.
![ssh key](./images/copy-multiple-file.png) ![ssh key](./images/copy-multiple-file.png)
@@ -11,15 +11,24 @@
copy files and artifacts via SSH as blow. copy files and artifacts via SSH as blow.
```yaml ```yaml
- name: copy file via ssh password name: scp files
uses: appleboy/scp-action@master on: [push]
with: jobs:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} build:
password: ${{ secrets.PASSWORD }} name: Build
port: ${{ secrets.PORT }} runs-on: ubuntu-latest
source: "tests/a.txt,tests/b.txt" steps:
target: "test" - uses: actions/checkout@master
- name: copy file via ssh password
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
source: "tests/a.txt,tests/b.txt"
target: "test"
``` ```
## Input variables ## Input variables
@@ -27,11 +36,11 @@ copy files and artifacts via SSH as blow.
see the [action.yml](./action.yml) file for more detail imformation. see the [action.yml](./action.yml) file for more detail imformation.
* host - scp remote host * host - scp remote host
* port - scp remote port * port - scp remote port, default is `22`
* username - scp username * username - scp username
* password - scp password * password - scp password
* timeout - timeout for ssh to remote host * timeout - timeout for ssh to remote host, default is `30s`
* command_timeout - timeout for scp command * command_timeout - timeout for scp command, default is `10m`
* key - content of ssh private key. ex raw content of ~/.ssh/id_rsa * key - content of ssh private key. ex raw content of ~/.ssh/id_rsa
* key_path - path of ssh private key * key_path - path of ssh private key
* target - target path on the server * target - target path on the server
@@ -90,7 +99,6 @@ Example configuration for ignore list:
Example configuration for multiple server Example configuration for multiple server
```diff ```diff
- name: copy file via ssh password
uses: appleboy/scp-action@master uses: appleboy/scp-action@master
with: with:
- host: "example.com" - host: "example.com"

View File

@@ -6,6 +6,7 @@ inputs:
description: 'scp remote host' description: 'scp remote host'
port: port:
description: 'scp remote port' description: 'scp remote port'
default: 22
username: username:
description: 'scp username' description: 'scp username'
password: password:
@@ -15,7 +16,7 @@ inputs:
default: "30s" default: "30s"
command_timeout: command_timeout:
description: 'timeout for scp command' description: 'timeout for scp command'
default: "1m" default: "10m"
key: key:
description: 'content of ssh private key. ex raw content of ~/.ssh/id_rsa' description: 'content of ssh private key. ex raw content of ~/.ssh/id_rsa'
key_path: key_path: