Compare commits

..

No commits in common. "2ead5e36573f08b82fbfce1504f1a4b05a647c6f" and "039c9e07bb37b35054415f27cdbfd7645237832d" have entirely different histories.

7 changed files with 91 additions and 91 deletions

View File

@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}

View File

@ -31,7 +31,7 @@ jobs:
sleep 2
- name: ssh by username and password
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
@ -43,7 +43,7 @@ jobs:
whoami
- name: ssh commands from a file
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
@ -95,7 +95,7 @@ jobs:
sleep 2
- name: ssh by private key
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
@ -104,7 +104,7 @@ jobs:
script: whoami
- name: wrong password but correct key
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
@ -114,7 +114,7 @@ jobs:
script: whoami
- name: correct password but wrong key
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
@ -167,7 +167,7 @@ jobs:
sleep 2
- name: ssh key passphrase
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
@ -179,7 +179,7 @@ jobs:
ls -al
- name: missing ssh key passphrase
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
continue-on-error: true
with:
host: ${{ env.REMOTE_HOST }}
@ -192,7 +192,7 @@ jobs:
# https://github.com/appleboy/ssh-action/issues/75#issuecomment-668314271
- name: Multiline SSH commands interpreted as single lines
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
@ -269,7 +269,7 @@ jobs:
# https://github.com/appleboy/ssh-action/issues/85
- name: Deployment to multiple hosts with different ports
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: "${{ env.REMOTE_HOST_01 }}:2222,${{ env.REMOTE_HOST_02 }}:2222"
username: linuxserver.io
@ -322,7 +322,7 @@ jobs:
sleep 2
- name: testing id_ed25519 key
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
@ -375,7 +375,7 @@ jobs:
sleep 2
- name: testing id_ed25519 key
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
@ -386,7 +386,7 @@ jobs:
ls -al
- name: pass environment
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
env:
FOO: "BAR"
with:
@ -400,7 +400,7 @@ jobs:
echo "I am $BAR, thanks"
- name: pass multiple environment
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
env:
FOO: "BAR"
BAR: "FOO"
@ -419,7 +419,7 @@ jobs:
echo "port: $PORT"
- name: custom envs format
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
env:
FOO: "BAR"
AAA: "BBB"
@ -437,7 +437,7 @@ jobs:
echo "I am $TEST_AAA, thanks"
- name: pass all ENV variables to script
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
env:
INPUT_FOO: "BAR"
INPUT_AAA: "BBB"
@ -454,7 +454,7 @@ jobs:
echo "$GITHUB_REF"
- name: switch to root user
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io

View File

@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: linuxserver.io
@ -183,7 +183,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -196,7 +196,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: executing remote ssh commands using ssh key
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -209,7 +209,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: multiple command
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -226,7 +226,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: file commands
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -239,7 +239,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
- host: "foo.com"
+ host: "foo.com,bar.com"
@ -257,7 +257,7 @@ The default value of `port` is `22`.
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
- host: "foo.com"
+ host: "foo.com:1234,bar.com:5678"
@ -272,7 +272,7 @@ The default value of `port` is `22`.
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: "foo.com,bar.com"
+ sync: true
@ -288,7 +288,7 @@ The default value of `port` is `22`.
```diff
- name: pass environment
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
+ env:
+ FOO: "BAR"
+ BAR: "FOO"
@ -335,7 +335,7 @@ Host FooServer
```diff
- name: ssh proxy command
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -358,7 +358,7 @@ It is not uncommon for files to leak from backups or decommissioned hardware, an
```diff
- name: ssh key passphrase
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -384,7 +384,7 @@ Now you can adjust you config:
```diff
- name: ssh key passphrase
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}

View File

@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: linuxserver.io
@ -183,7 +183,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -196,7 +196,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: executing remote ssh commands using ssh key
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -209,7 +209,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: multiple command
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -226,7 +226,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: file commands
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -239,7 +239,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
- host: "foo.com"
+ host: "foo.com,bar.com"
@ -257,7 +257,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
- host: "foo.com"
+ host: "foo.com:1234,bar.com:5678"
@ -272,7 +272,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: "foo.com,bar.com"
+ sync: true
@ -288,7 +288,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff
- name: pass environment
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
+ env:
+ FOO: "BAR"
+ BAR: "FOO"
@ -335,7 +335,7 @@ Host FooServer
```diff
- name: ssh proxy command
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -356,7 +356,7 @@ Host FooServer
```diff
- name: ssh key passphrase
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -382,7 +382,7 @@ ssh example.com ssh-keygen -l -f /etc/ssh/ssh_host_ed25519_key.pub | cut -d ' '
```diff
- name: ssh key passphrase
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}

View File

@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: linuxserver.io
@ -181,7 +181,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -194,7 +194,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: executing remote ssh commands using ssh key
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -207,7 +207,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: multiple command
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -224,7 +224,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml
- name: file commands
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -237,7 +237,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
- host: "foo.com"
+ host: "foo.com,bar.com"
@ -253,7 +253,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
- host: "foo.com"
+ host: "foo.com:1234,bar.com:5678"
@ -268,7 +268,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: "foo.com,bar.com"
+ sync: true
@ -284,7 +284,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff
- name: pass environment
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
+ env:
+ FOO: "BAR"
+ BAR: "FOO"
@ -331,7 +331,7 @@ Host FooServer
```diff
- name: ssh proxy command
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -352,7 +352,7 @@ Host FooServer
```diff
- name: ssh key passphrase
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
@ -378,7 +378,7 @@ ssh example.com ssh-keygen -l -f /etc/ssh/ssh_host_ed25519_key.pub | cut -d ' '
```diff
- name: ssh key passphrase
uses: appleboy/ssh-action@v1.2.2
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}

View File

@ -3,85 +3,85 @@ description: "Executing remote ssh commands"
author: "Bo-Yi Wu"
inputs:
host:
description: "SSH host address or IP to connect to."
description: "SSH host address."
port:
description: "SSH port number for the connection."
description: "SSH port number."
default: "22"
passphrase:
description: "Passphrase to decrypt the SSH private key if protected."
description: "Passphrase for the SSH key."
username:
description: "SSH username for authentication on the remote server."
description: "SSH username."
password:
description: "SSH password for authentication (use secrets for sensitive data)."
description: "SSH password."
protocol:
description: 'IP protocol version to use. Options: "tcp" (default), "tcp4" (IPv4 only), or "tcp6" (IPv6 only).'
description: 'The IP protocol to use. Valid values are "tcp". "tcp4" or "tcp6". Default to tcp.'
default: "tcp"
sync:
description: "When true, executes commands synchronously across multiple hosts (one after another)."
description: "Enable synchronous execution if multiple hosts are involved."
use_insecure_cipher:
description: "Enable additional legacy ciphers that might be less secure but more compatible with older systems."
description: "Include more ciphers by using insecure ciphers."
cipher:
description: "Specify custom cipher algorithms for encryption. Leave empty to use secure defaults."
description: "Allowed cipher algorithms. If unspecified, a sensible default is used."
timeout:
description: "Maximum time to wait when establishing the SSH connection, e.g., '30s', '1m'."
description: "Timeout duration for establishing SSH connection to the host."
default: "30s"
command_timeout:
description: "Maximum execution time for the remote commands before terminating, e.g., '10m', '1h'."
description: "Timeout duration for SSH commands execution."
default: "10m"
key:
description: "Raw content of the SSH private key for authentication (use secrets for sensitive data)."
description: "Content of the SSH private key. For example, the raw content of ~/.ssh/id_rsa."
key_path:
description: "Path to the SSH private key file on the runner."
description: "Path to the SSH private key file."
fingerprint:
description: "SHA256 fingerprint of the host public key for verification to prevent MITM attacks."
description: "SHA256 fingerprint of the host public key."
proxy_host:
description: "Proxy server hostname or IP if connecting through an SSH jump host."
description: "SSH proxy host address."
proxy_port:
description: "SSH port number for the proxy connection."
description: "SSH proxy port number."
default: "22"
proxy_username:
description: "Username for authentication on the proxy server."
description: "SSH proxy username."
proxy_password:
description: "Password for authentication on the proxy server (use secrets for sensitive data)."
description: "SSH proxy password."
proxy_protocol:
description: 'IP protocol version for proxy. Options: "tcp" (default), "tcp4" (IPv4 only), or "tcp6" (IPv6 only).'
description: 'The IP protocol to use. Valid values are "tcp". "tcp4" or "tcp6". Default to tcp.'
default: "tcp"
proxy_passphrase:
description: "Passphrase to decrypt the proxy SSH private key if protected."
description: "SSH proxy key passphrase."
proxy_timeout:
description: "Maximum time to wait when establishing the proxy SSH connection, e.g., '30s', '1m'."
description: "Timeout duration for establishing SSH connection to the proxy host."
default: "30s"
proxy_key:
description: "Raw content of the SSH proxy private key for authentication (use secrets for sensitive data)."
description: "Content of the SSH proxy private key. For example, the raw content of ~/.ssh/id_rsa."
proxy_key_path:
description: "Path to the SSH proxy private key file on the runner."
description: "Path to the SSH proxy private key file."
proxy_fingerprint:
description: "SHA256 fingerprint of the proxy host public key for verification."
description: "SHA256 fingerprint of the proxy host public key."
proxy_cipher:
description: "Specify custom cipher algorithms for proxy connection encryption."
description: "Allowed cipher algorithms for the proxy. If unspecified, a sensible default is used."
proxy_use_insecure_cipher:
description: "Enable additional legacy ciphers for proxy connections (less secure but more compatible)."
description: "Include more ciphers for the proxy by using insecure ciphers."
script:
description: "Commands to execute on the remote server (inline script string)."
description: "Commands to be executed."
script_path:
description: "Path to a local file containing commands to execute on the remote server."
description: "Path to the file containing commands to be executed."
envs:
description: "Environment variables to expose to the remote script, format: key=value,key2=value2."
description: "Environment variables to be passed to the shell script."
envs_format:
description: "Format specification for environment variable transfer (for advanced usage)."
description: "Flexible configuration for environment value transfer."
debug:
description: "Set to true to enable verbose logging for troubleshooting connection issues."
description: "Enable debug mode."
allenvs:
description: "When true, passes all GitHub Actions environment variables to the remote script."
description: "pass all environment variable to shell script."
request_pty:
description: "Request a pseudo-terminal from the server (required for interactive commands or sudo)."
description: "Request a pseudo-terminal from the server."
capture_stdout:
description: "When true, captures and returns standard output from the commands as action output."
description: "Capture the stdout of the commands."
default: "false"
outputs:
stdout:
description: "Standard output of the executed commands when capture_stdout is enabled."
description: 'Standard output of the executed commands.'
value: ${{ steps.entrypoint.outputs.stdout }}
runs:

View File

@ -8,7 +8,7 @@ export GITHUB="true"
GITHUB_ACTION_PATH="${GITHUB_ACTION_PATH%/}"
DRONE_SSH_RELEASE_URL="${DRONE_SSH_RELEASE_URL:-https://github.com/appleboy/drone-ssh/releases/download}"
DRONE_SSH_VERSION="${DRONE_SSH_VERSION:-1.8.1}"
DRONE_SSH_VERSION="${DRONE_SSH_VERSION:-1.8.0}"
function detect_client_info() {
if [ -n "${SSH_CLIENT_OS-}" ]; then
@ -69,9 +69,9 @@ echo "======= CLI Version ======="
sh -c "${TARGET} --version" # print version
echo "==========================="
if [[ "$INPUT_CAPTURE_STDOUT" == 'true' ]]; then
echo 'stdout<<EOF' >>$GITHUB_OUTPUT # use heredoc for multiline output
echo 'stdout<<EOF' >> $GITHUB_OUTPUT # use heredoc for multiline output
sh -c "${TARGET} $*" | tee -a $GITHUB_OUTPUT # run the command
echo 'EOF' >>$GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
else
sh -c "${TARGET} $*" # run the command
fi