Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6d1fc191a8 | ||
|
233f762873 | ||
|
b3f8d37ead | ||
|
f57f59fba9 | ||
|
8a54b39459 | ||
|
eb319b796f | ||
|
3c3575eb49 | ||
|
edc8ec9139 | ||
|
167d6d7ff4 | ||
|
ecd6a3623b | ||
|
31b514c281 | ||
|
5924b2b6d4 | ||
|
a2fea1040d | ||
|
8535291767 |
10
.github/dependabot.yml
vendored
Normal file
10
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@@ -50,3 +50,15 @@ jobs:
|
|||||||
port: ${{ secrets.PORT }}
|
port: ${{ secrets.PORT }}
|
||||||
source: "tests/a.txt,tests/b.txt"
|
source: "tests/a.txt,tests/b.txt"
|
||||||
target: "test"
|
target: "test"
|
||||||
|
|
||||||
|
- name: use insecure cipher
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
key: ${{ secrets.SSH2 }}
|
||||||
|
passphrase: ${{ secrets.PASSPHRASE }}
|
||||||
|
port: ${{ secrets.PORT }}
|
||||||
|
source: "tests/a.txt,tests/b.txt"
|
||||||
|
target: "test"
|
||||||
|
use_insecure_cipher: true
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
FROM appleboy/drone-scp:1.6.0-linux-amd64
|
FROM appleboy/drone-scp:1.6.4-linux-amd64
|
||||||
|
|
||||||
ADD entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
22
README.md
22
README.md
@@ -2,15 +2,13 @@
|
|||||||
|
|
||||||
[GitHub Action](https://github.com/features/actions) for copying files and artifacts via SSH.
|
[GitHub Action](https://github.com/features/actions) for copying files and artifacts via SSH.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
[](https://github.com/appleboy/scp-action/actions)
|
[](https://github.com/appleboy/scp-action/actions)
|
||||||
|
|
||||||
**Importment**: Only support **Linux** container.
|
**Important**: Only support **Linux** [docker](https://www.docker.com/) container.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
copy files and artifacts via SSH as blow.
|
Copy files and artifacts via SSH:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: scp files
|
name: scp files
|
||||||
@@ -35,7 +33,7 @@ jobs:
|
|||||||
|
|
||||||
## Input variables
|
## Input variables
|
||||||
|
|
||||||
see the [action.yml](./action.yml) file for more detail imformation.
|
See the [action.yml](./action.yml) file for more detail information.
|
||||||
|
|
||||||
* host - scp remote host
|
* host - scp remote host
|
||||||
* port - scp remote port, default is `22`
|
* port - scp remote port, default is `22`
|
||||||
@@ -53,6 +51,7 @@ see the [action.yml](./action.yml) file for more detail imformation.
|
|||||||
* 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
|
* overwrite - use `--overwrite` flag with tar
|
||||||
* tar_tmp_path - temporary path for tar file on the dest host
|
* tar_tmp_path - temporary path for tar file on the dest host
|
||||||
|
* use_insecure_cipher - include more ciphers with use_insecure_cipher (see [#15](https://github.com/appleboy/scp-action/issues/15))
|
||||||
|
|
||||||
SSH Proxy Setting:
|
SSH Proxy Setting:
|
||||||
|
|
||||||
@@ -65,10 +64,11 @@ SSH Proxy Setting:
|
|||||||
* proxy_key - content of ssh proxy private key.
|
* proxy_key - content of ssh proxy private key.
|
||||||
* proxy_key_path - path of ssh proxy private key
|
* proxy_key_path - path of ssh proxy private key
|
||||||
* proxy_fingerprint - fingerprint SHA256 of the host public key, default is to skip verification
|
* proxy_fingerprint - fingerprint SHA256 of the host public key, default is to skip verification
|
||||||
|
* proxy_use_insecure_cipher - include more ciphers with use_insecure_cipher (see [#15](https://github.com/appleboy/scp-action/issues/15))
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
Copy file via ssh password
|
Copy file via a SSH password:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: copy file via ssh password
|
- name: copy file via ssh password
|
||||||
@@ -82,7 +82,7 @@ Copy file via ssh password
|
|||||||
target: "test"
|
target: "test"
|
||||||
```
|
```
|
||||||
|
|
||||||
Copy file via ssh key
|
Copy file via a SSH key:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: copy file via ssh key
|
- name: copy file via ssh key
|
||||||
@@ -110,7 +110,7 @@ Example configuration for ignore list:
|
|||||||
target: "test"
|
target: "test"
|
||||||
```
|
```
|
||||||
|
|
||||||
Example configuration for multiple server
|
Example configuration for multiple servers:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
uses: appleboy/scp-action@master
|
uses: appleboy/scp-action@master
|
||||||
@@ -124,7 +124,7 @@ Example configuration for multiple server
|
|||||||
target: "test"
|
target: "test"
|
||||||
```
|
```
|
||||||
|
|
||||||
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
|
||||||
@@ -139,7 +139,7 @@ remove the specified number of leading path elements
|
|||||||
strip_components: 1
|
strip_components: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
old target structure:
|
Old target structure:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
foobar
|
foobar
|
||||||
@@ -148,7 +148,7 @@ foobar
|
|||||||
└── b.txt
|
└── b.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
new target structure:
|
New target structure:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
foobar
|
foobar
|
||||||
|
@@ -25,6 +25,9 @@ inputs:
|
|||||||
description: 'ssh key passphrase'
|
description: 'ssh key passphrase'
|
||||||
fingerprint:
|
fingerprint:
|
||||||
description: 'fingerprint SHA256 of the host public key, default is to skip verification'
|
description: 'fingerprint SHA256 of the host public key, default is to skip verification'
|
||||||
|
use_insecure_cipher:
|
||||||
|
description: 'include more ciphers with use_insecure_cipher'
|
||||||
|
default: false
|
||||||
target:
|
target:
|
||||||
description: 'target path on the server'
|
description: 'target path on the server'
|
||||||
source:
|
source:
|
||||||
@@ -63,6 +66,9 @@ inputs:
|
|||||||
description: 'path of ssh proxy private key'
|
description: 'path of ssh proxy private key'
|
||||||
proxy_fingerprint:
|
proxy_fingerprint:
|
||||||
description: 'fingerprint SHA256 of the host public key, default is to skip verification'
|
description: 'fingerprint SHA256 of the host public key, default is to skip verification'
|
||||||
|
proxy_use_insecure_cipher:
|
||||||
|
description: 'include more ciphers with use_insecure_cipher'
|
||||||
|
default: false
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
|
Reference in New Issue
Block a user