2024-10-28 22:28:31 +08:00
|
|
|
name: "SCP Command to Transfer Files"
|
|
|
|
description: "How to Use SCP Command to Transfer Files/Folders in Linux"
|
|
|
|
author: "Bo-Yi Wu"
|
2019-09-28 10:42:13 +08:00
|
|
|
inputs:
|
|
|
|
host:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "scp remote host"
|
2019-09-28 10:42:13 +08:00
|
|
|
port:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "scp remote port"
|
|
|
|
default: "22"
|
2019-09-28 10:42:13 +08:00
|
|
|
username:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "scp username"
|
2019-09-28 10:42:13 +08:00
|
|
|
password:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "scp password"
|
2024-10-28 22:33:53 +08:00
|
|
|
protocol:
|
|
|
|
description: "The IP protocol to use. Valid values are 'tcp'. 'tcp4' or 'tcp6'. Default to tcp."
|
|
|
|
default: "tcp"
|
2019-09-28 10:42:13 +08:00
|
|
|
timeout:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "timeout for ssh to remote host"
|
2019-09-28 12:41:21 +08:00
|
|
|
default: "30s"
|
2019-09-28 10:42:13 +08:00
|
|
|
command_timeout:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "timeout for scp command"
|
2019-11-30 23:17:05 +08:00
|
|
|
default: "10m"
|
2019-09-28 10:42:13 +08:00
|
|
|
key:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "content of ssh private key. ex raw content of ~/.ssh/id_rsa"
|
2019-09-28 10:42:13 +08:00
|
|
|
key_path:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "path of ssh private key"
|
2020-01-20 23:07:25 +08:00
|
|
|
passphrase:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "ssh key passphrase"
|
2020-05-22 09:44:56 +08:00
|
|
|
fingerprint:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "fingerprint SHA256 of the host public key, default is to skip verification"
|
2020-05-24 14:24:45 +08:00
|
|
|
use_insecure_cipher:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "include more ciphers with use_insecure_cipher"
|
2019-09-28 10:42:13 +08:00
|
|
|
target:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "target path on the server, must be a directory path."
|
2019-09-28 10:42:13 +08:00
|
|
|
source:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "scp file list"
|
2019-09-28 10:42:13 +08:00
|
|
|
rm:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "remove target folder before upload data"
|
2020-05-21 23:33:05 +08:00
|
|
|
debug:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "enable debug message"
|
2019-09-28 12:26:40 +08:00
|
|
|
strip_components:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "remove the specified number of leading path elements"
|
2019-09-29 01:42:21 +08:00
|
|
|
overwrite:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "use --overwrite flag with tar"
|
2023-04-09 15:51:09 +08:00
|
|
|
tar_dereference:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "use --dereference flag with tar"
|
2019-09-29 01:42:21 +08:00
|
|
|
tar_tmp_path:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "temporary path for tar file on the dest host"
|
2023-04-09 11:57:45 +08:00
|
|
|
tar_exec:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "temporary path for tar file on the dest host"
|
|
|
|
default: "tar"
|
2020-01-20 23:08:15 +08:00
|
|
|
proxy_host:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "ssh proxy remote host"
|
2020-01-20 23:08:15 +08:00
|
|
|
proxy_port:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "ssh proxy remote port"
|
|
|
|
default: "22"
|
2020-01-20 23:08:15 +08:00
|
|
|
proxy_username:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "ssh proxy username"
|
2020-01-20 23:08:15 +08:00
|
|
|
proxy_password:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "ssh proxy password"
|
2020-01-20 23:08:15 +08:00
|
|
|
proxy_passphrase:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "ssh proxy key passphrase"
|
2020-01-20 23:08:15 +08:00
|
|
|
proxy_timeout:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "timeout for ssh to proxy host"
|
2020-01-20 23:08:15 +08:00
|
|
|
default: "30s"
|
|
|
|
proxy_key:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "content of ssh proxy private key. ex raw content of ~/.ssh/id_rsa"
|
2020-01-20 23:08:15 +08:00
|
|
|
proxy_key_path:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "path of ssh proxy private key"
|
2020-05-22 09:44:56 +08:00
|
|
|
proxy_fingerprint:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "fingerprint SHA256 of the host public key, default is to skip verification"
|
2020-05-24 14:24:45 +08:00
|
|
|
proxy_use_insecure_cipher:
|
2024-10-28 22:28:31 +08:00
|
|
|
description: "include more ciphers with use_insecure_cipher"
|
2025-04-27 10:35:50 +08:00
|
|
|
curl_insecure:
|
|
|
|
description: "When true, uses the --insecure option with curl for insecure downloads."
|
|
|
|
default: "false"
|
|
|
|
capture_stdout:
|
|
|
|
description: "When true, captures and returns standard output from the commands as action output."
|
|
|
|
default: "false"
|
|
|
|
version:
|
|
|
|
description: |
|
|
|
|
The version of drone-scp to use.
|
|
|
|
|
|
|
|
outputs:
|
|
|
|
stdout:
|
|
|
|
description: "Standard output of the executed commands when capture_stdout is enabled."
|
|
|
|
value: ${{ steps.entrypoint.outputs.stdout }}
|
|
|
|
|
2019-09-28 10:42:13 +08:00
|
|
|
runs:
|
2025-04-27 10:35:50 +08:00
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- name: Set GitHub Path
|
|
|
|
run: echo "$GITHUB_ACTION_PATH" >> $GITHUB_PATH
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
GITHUB_ACTION_PATH: ${{ github.action_path }}
|
|
|
|
- id: entrypoint
|
|
|
|
name: Run entrypoint.sh
|
|
|
|
run: entrypoint.sh
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
GITHUB_ACTION_PATH: ${{ github.action_path }}
|
|
|
|
INPUT_HOST: ${{ inputs.host }}
|
|
|
|
INPUT_PORT: ${{ inputs.port }}
|
|
|
|
INPUT_PROTOCOL: ${{ inputs.protocol }}
|
|
|
|
INPUT_USERNAME: ${{ inputs.username }}
|
|
|
|
INPUT_PASSWORD: ${{ inputs.password }}
|
|
|
|
INPUT_PASSPHRASE: ${{ inputs.passphrase }}
|
|
|
|
INPUT_KEY: ${{ inputs.key }}
|
|
|
|
INPUT_KEY_PATH: ${{ inputs.key_path }}
|
|
|
|
INPUT_FINGERPRINT: ${{ inputs.fingerprint }}
|
|
|
|
INPUT_PROXY_HOST: ${{ inputs.proxy_host }}
|
|
|
|
INPUT_PROXY_PORT: ${{ inputs.proxy_port }}
|
|
|
|
INPUT_PROXY_USERNAME: ${{ inputs.proxy_username }}
|
|
|
|
INPUT_PROXY_PASSWORD: ${{ inputs.proxy_password }}
|
|
|
|
INPUT_PROXY_PASSPHRASE: ${{ inputs.proxy_passphrase }}
|
|
|
|
INPUT_PROXY_KEY: ${{ inputs.proxy_key }}
|
|
|
|
INPUT_PROXY_KEY_PATH: ${{ inputs.proxy_key_path }}
|
|
|
|
INPUT_PROXY_FINGERPRINT: ${{ inputs.proxy_fingerprint }}
|
|
|
|
INPUT_USE_INSECURE_CIPHER: ${{ inputs.use_insecure_cipher }}
|
|
|
|
INPUT_CIPHER: ${{ inputs.cipher }}
|
|
|
|
INPUT_PROXY_USE_INSECURE_CIPHER: ${{ inputs.proxy_use_insecure_cipher }}
|
|
|
|
INPUT_PROXY_CIPHER: ${{ inputs.proxy_cipher }}
|
|
|
|
INPUT_DEBUG: ${{ inputs.debug }}
|
|
|
|
INPUT_TIMEOUT: ${{ inputs.timeout }}
|
|
|
|
INPUT_COMMAND_TIMEOUT: ${{ inputs.command_timeout }}
|
|
|
|
INPUT_TARGET: ${{ inputs.target }}
|
|
|
|
INPUT_SOURCE: ${{ inputs.source }}
|
|
|
|
INPUT_RM: ${{ inputs.rm }}
|
|
|
|
INPUT_STRIP_COMPONENTS: ${{ inputs.strip_components }}
|
|
|
|
INPUT_OVERWRITE: ${{ inputs.overwrite }}
|
|
|
|
INPUT_TAR_DEREFERENCE: ${{ inputs.tar_dereference }}
|
|
|
|
INPUT_TAR_TMP_PATH: ${{ inputs.tar_tmp_path }}
|
|
|
|
INPUT_TAR_EXEC: ${{ inputs.tar_exec }}
|
|
|
|
INPUT_PROXY_TIMEOUT: ${{ inputs.proxy_timeout }}
|
|
|
|
INPUT_CAPTURE_STDOUT: ${{ inputs.capture_stdout }}
|
|
|
|
INPUT_CURL_INSECURE: ${{ inputs.curl_insecure }}
|
|
|
|
DRONE_SCP_VERSION: ${{ inputs.version }}
|
2019-09-28 10:42:13 +08:00
|
|
|
|
|
|
|
branding:
|
2024-10-28 22:28:31 +08:00
|
|
|
icon: "copy"
|
|
|
|
color: "gray-dark"
|