Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
196ea3f88f | ||
|
034b0ad00c | ||
|
95e250284b | ||
|
a593d18cb8 | ||
|
2e28e2ddc9 | ||
|
f8189f0fbf |
@@ -1,4 +1,4 @@
|
|||||||
FROM appleboy/drone-scp:1.5.2-linux-amd64
|
FROM appleboy/drone-scp:1.5.3-linux-amd64
|
||||||
|
|
||||||
ADD entrypoint.sh /entrypoint.sh
|
ADD entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
35
README.md
35
README.md
@@ -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.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -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
|
||||||
@@ -30,14 +39,16 @@ see the [action.yml](./action.yml) file for more detail imformation.
|
|||||||
* port - scp remote port
|
* port - scp remote port
|
||||||
* 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 `1m`
|
||||||
* 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
|
||||||
* source - scp file list
|
* source - scp file list
|
||||||
* rm - remove target folder before upload data
|
* rm - remove target folder before upload data
|
||||||
* strip_components - remove the specified number of leading path elements.
|
* strip_components - remove the specified number of leading path elements.
|
||||||
|
* overwrite - use `--overwrite` flag with tar
|
||||||
|
* tar_tmp_path - temporary path for tar file on the dest host
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
|
@@ -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:
|
||||||
@@ -29,6 +30,11 @@ inputs:
|
|||||||
strip_components:
|
strip_components:
|
||||||
description: 'remove the specified number of leading path elements'
|
description: 'remove the specified number of leading path elements'
|
||||||
default: 0
|
default: 0
|
||||||
|
overwrite:
|
||||||
|
description: 'use `--overwrite` flag with tar'
|
||||||
|
default: false
|
||||||
|
tar_tmp_path:
|
||||||
|
description: 'temporary path for tar file on the dest host'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
|
Reference in New Issue
Block a user