2024-01-07 19:39:23 +08:00
|
|
|
name: "SSH Remote Commands"
|
|
|
|
description: "Executing remote ssh commands"
|
|
|
|
author: "Bo-Yi Wu"
|
2019-09-29 10:34:52 +08:00
|
|
|
inputs:
|
|
|
|
host:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "SSH host address."
|
2019-09-29 10:34:52 +08:00
|
|
|
port:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "SSH port number."
|
2023-06-04 11:06:25 +08:00
|
|
|
default: "22"
|
2019-12-30 19:50:55 +08:00
|
|
|
passphrase:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Passphrase for the SSH key."
|
2019-09-29 10:34:52 +08:00
|
|
|
username:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "SSH username."
|
2019-09-29 10:34:52 +08:00
|
|
|
password:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "SSH password."
|
2024-03-16 15:45:28 +08:00
|
|
|
protocol:
|
|
|
|
description: 'The IP protocol to use. Valid values are "tcp". "tcp4" or "tcp6". Default to tcp.'
|
|
|
|
default: "tcp"
|
2020-01-30 17:40:33 +03:00
|
|
|
sync:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Enable synchronous execution if multiple hosts are involved."
|
2020-05-24 10:54:31 +08:00
|
|
|
use_insecure_cipher:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Include more ciphers by using insecure ciphers."
|
2020-05-24 13:13:09 +08:00
|
|
|
cipher:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Allowed cipher algorithms. If unspecified, a sensible default is used."
|
2019-09-29 10:34:52 +08:00
|
|
|
timeout:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Timeout duration for establishing SSH connection to the host."
|
2019-09-29 10:34:52 +08:00
|
|
|
default: "30s"
|
|
|
|
command_timeout:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Timeout duration for SSH commands execution."
|
2019-11-30 23:01:49 +08:00
|
|
|
default: "10m"
|
2019-09-29 10:34:52 +08:00
|
|
|
key:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Content of the SSH private key. For example, the raw content of ~/.ssh/id_rsa."
|
2019-09-29 10:34:52 +08:00
|
|
|
key_path:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Path to the SSH private key file."
|
2020-05-18 23:21:26 -07:00
|
|
|
fingerprint:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "SHA256 fingerprint of the host public key."
|
2019-12-07 20:05:02 +08:00
|
|
|
proxy_host:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "SSH proxy host address."
|
2019-12-07 20:05:02 +08:00
|
|
|
proxy_port:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "SSH proxy port number."
|
2023-06-04 11:06:25 +08:00
|
|
|
default: "22"
|
2019-12-07 20:05:02 +08:00
|
|
|
proxy_username:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "SSH proxy username."
|
2019-12-07 20:05:02 +08:00
|
|
|
proxy_password:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "SSH proxy password."
|
2024-10-28 22:36:36 +08:00
|
|
|
proxy_protocol:
|
|
|
|
description: 'The IP protocol to use. Valid values are "tcp". "tcp4" or "tcp6". Default to tcp.'
|
|
|
|
default: "tcp"
|
2019-12-30 19:50:55 +08:00
|
|
|
proxy_passphrase:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "SSH proxy key passphrase."
|
2019-12-07 20:05:02 +08:00
|
|
|
proxy_timeout:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Timeout duration for establishing SSH connection to the proxy host."
|
2019-12-07 20:05:02 +08:00
|
|
|
default: "30s"
|
|
|
|
proxy_key:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Content of the SSH proxy private key. For example, the raw content of ~/.ssh/id_rsa."
|
2019-12-07 20:05:02 +08:00
|
|
|
proxy_key_path:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Path to the SSH proxy private key file."
|
2020-05-18 23:21:26 -07:00
|
|
|
proxy_fingerprint:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "SHA256 fingerprint of the proxy host public key."
|
2020-05-24 13:13:09 +08:00
|
|
|
proxy_cipher:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Allowed cipher algorithms for the proxy. If unspecified, a sensible default is used."
|
2020-05-24 10:54:31 +08:00
|
|
|
proxy_use_insecure_cipher:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Include more ciphers for the proxy by using insecure ciphers."
|
2019-09-29 10:34:52 +08:00
|
|
|
script:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Commands to be executed."
|
2024-11-16 22:57:46 -08:00
|
|
|
script_path:
|
|
|
|
description: "Path to the file containing commands to be executed."
|
2019-09-29 10:34:52 +08:00
|
|
|
script_stop:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Stop the script after the first failure."
|
2019-09-29 10:34:52 +08:00
|
|
|
envs:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Environment variables to be passed to the shell script."
|
2023-04-13 11:15:42 +08:00
|
|
|
envs_format:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Flexible configuration for environment value transfer."
|
2019-09-29 10:34:52 +08:00
|
|
|
debug:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "Enable debug mode."
|
2023-07-23 09:53:20 +08:00
|
|
|
allenvs:
|
2024-01-07 19:39:23 +08:00
|
|
|
description: "pass all environment variable to shell script."
|
|
|
|
request_pty:
|
|
|
|
description: "Request a pseudo-terminal from the server."
|
2024-03-16 15:45:28 +08:00
|
|
|
|
2019-09-29 10:34:52 +08:00
|
|
|
runs:
|
2024-03-16 15:45:28 +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 }}
|
|
|
|
- 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_TIMEOUT: ${{ inputs.timeout }}
|
|
|
|
INPUT_PROXY_TIMEOUT: ${{ inputs.proxy_timeout }}
|
|
|
|
INPUT_COMMAND_TIMEOUT: ${{ inputs.command_timeout }}
|
|
|
|
INPUT_SCRIPT: ${{ inputs.script }}
|
2024-11-16 22:57:46 -08:00
|
|
|
INPUT_SCRIPT_FILE: ${{ inputs.script_path }}
|
2024-03-16 15:45:28 +08:00
|
|
|
INPUT_SCRIPT_STOP: ${{ inputs.script_stop }}
|
|
|
|
INPUT_ENVS: ${{ inputs.envs }}
|
|
|
|
INPUT_ENVS_FORMAT: ${{ inputs.envs_format }}
|
|
|
|
INPUT_DEBUG: ${{ inputs.debug }}
|
|
|
|
INPUT_ALL_ENVS: ${{ inputs.allenvs }}
|
|
|
|
INPUT_REQUEST_PTY: ${{ inputs.request_pty }}
|
|
|
|
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_SYNC: ${{ inputs.sync }}
|
2019-09-29 10:34:52 +08:00
|
|
|
|
|
|
|
branding:
|
2024-01-07 19:39:23 +08:00
|
|
|
icon: "terminal"
|
|
|
|
color: "gray-dark"
|