docs: restructure and clarify parameter documentation across all readmes

- Restructure input parameter documentation by splitting into distinct sections: Connection Settings, SSH Command Settings, and Proxy Settings for better clarity
- Move parameters related to command execution out of proxy section and into the new SSH Command Settings section
- Add/clarify descriptions for individual sections and parameters in all three language readmes
- Update and correct parameter ordering, grouping, and formatting for consistency across all documentation
- Add missing SSH Command Settings parameters and improve readability of parameter tables

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy 2025-04-27 12:35:14 +08:00
parent 8f3cc07719
commit 8745f9583c
No known key found for this signature in database
3 changed files with 186 additions and 111 deletions

View File

@ -8,6 +8,9 @@ English | [繁體中文](./README.zh-tw.md) | [简体中文](./README.zh-cn.md)
- [Table of Contents](#table-of-contents) - [Table of Contents](#table-of-contents)
- [📖 Introduction](#-introduction) - [📖 Introduction](#-introduction)
- [🧩 Core Concepts \& Input Parameters](#-core-concepts--input-parameters) - [🧩 Core Concepts \& Input Parameters](#-core-concepts--input-parameters)
- [🔌 Connection Settings](#-connection-settings)
- [🛠️ SSH Command Settings](#-ssh-command-settings)
- [🌐 Proxy Settings](#-proxy-settings)
- [⚡ Quick Start](#-quick-start) - [⚡ Quick Start](#-quick-start)
- [🔑 SSH Key Setup \& OpenSSH Compatibility](#-ssh-key-setup--openssh-compatibility) - [🔑 SSH Key Setup \& OpenSSH Compatibility](#-ssh-key-setup--openssh-compatibility)
- [Setting Up SSH Keys](#setting-up-ssh-keys) - [Setting Up SSH Keys](#setting-up-ssh-keys)
@ -52,43 +55,65 @@ This action provides flexible SSH command execution with a rich set of configura
For full details, see [action.yml](./action.yml). For full details, see [action.yml](./action.yml).
| Parameter | Description | Default | ### 🔌 Connection Settings
| ------------------------- | --------------------------------------------------------------------------------- | ------- |
| host | SSH host address | | These parameters control how the action connects to your remote host.
| port | SSH port number | 22 |
| passphrase | Passphrase for the SSH private key | | | Parameter | Description | Default |
| username | SSH username | | | ------------------- | ----------------------------------------------------------------- | ------- |
| password | SSH password | | | host | SSH host address | |
| protocol | SSH protocol version (`tcp`, `tcp4`, `tcp6`) | tcp | | port | SSH port number | 22 |
| sync | Run synchronously if multiple hosts are specified | false | | username | SSH username | |
| use_insecure_cipher | Allow additional (less secure) ciphers | false | | password | SSH password | |
| cipher | Allowed cipher algorithms. Uses sensible defaults if unspecified | | | protocol | SSH protocol version (`tcp`, `tcp4`, `tcp6`) | tcp |
| timeout | Timeout for SSH connection to host | 30s | | sync | Run synchronously if multiple hosts are specified | false |
| command_timeout | Timeout for SSH command execution | 10m | | timeout | Timeout for SSH connection to host | 30s |
| key | Content of SSH private key (e.g., raw content of `~/.ssh/id_rsa`) | | | key | Content of SSH private key (e.g., raw content of `~/.ssh/id_rsa`) | |
| key_path | Path to SSH private key | | | key_path | Path to SSH private key | |
| fingerprint | SHA256 fingerprint of the host public key | | | passphrase | Passphrase for the SSH private key | |
| proxy_host | SSH proxy host | | | fingerprint | SHA256 fingerprint of the host public key | |
| proxy_port | SSH proxy port | 22 | | use_insecure_cipher | Allow additional (less secure) ciphers | false |
| proxy_protocol | SSH proxy protocol version (`tcp`, `tcp4`, `tcp6`) | tcp | | cipher | Allowed cipher algorithms. Uses sensible defaults if unspecified | |
| proxy_username | SSH proxy username | |
| proxy_password | SSH proxy password | | ---
| proxy_passphrase | SSH proxy key passphrase | |
| proxy_timeout | Timeout for SSH connection to proxy host | 30s | ### 🛠️ SSH Command Settings
| proxy_key | Content of SSH proxy private key | |
| proxy_key_path | Path to SSH proxy private key | | These parameters control the commands executed on the remote host and related behaviors.
| proxy_fingerprint | SHA256 fingerprint of the proxy host public key | |
| proxy_cipher | Allowed cipher algorithms for the proxy | | | Parameter | Description | Default |
| proxy_use_insecure_cipher | Allow additional (less secure) ciphers for the proxy | false | | --------------- | --------------------------------------------------------------------------------- | ------- |
| script | Commands to execute remotely | | | script | Commands to execute remotely | |
| script_path | Path to a file containing commands to execute | | | script_path | Path to a file containing commands to execute | |
| envs | Environment variables to pass to the shell script | | | envs | Environment variables to pass to the shell script | |
| envs_format | Flexible configuration for environment variable transfer | | | envs_format | Flexible configuration for environment variable transfer | |
| debug | Enable debug mode | false | | allenvs | Pass all environment variables with `GITHUB_` and `INPUT_` prefixes to the script | false |
| allenvs | Pass all environment variables with `GITHUB_` and `INPUT_` prefixes to the script | false | | command_timeout | Timeout for SSH command execution | 10m |
| request_pty | Request a pseudo-terminal from the server | false | | debug | Enable debug mode | false |
| curl_insecure | Allow curl to connect to SSL sites without certificates | false | | request_pty | Request a pseudo-terminal from the server | false |
| version | drone-ssh binary version. If not specified, the latest version will be used. | | | curl_insecure | Allow curl to connect to SSL sites without certificates | false |
| version | drone-ssh binary version. If not specified, the latest version will be used. | |
---
### 🌐 Proxy Settings
These parameters control the use of a proxy (jump host) for connecting to your target host.
| Parameter | Description | Default |
| ------------------------- | ----------------------------------------------- | ------- |
| proxy_host | SSH proxy host | |
| proxy_port | SSH proxy port | 22 |
| proxy_username | SSH proxy username | |
| proxy_password | SSH proxy password | |
| proxy_passphrase | SSH proxy key passphrase | |
| proxy_protocol | SSH proxy protocol version | tcp |
| proxy_timeout | Timeout for SSH connection to proxy host | 30s |
| proxy_key | Content of SSH proxy private key | |
| proxy_key_path | Path to SSH proxy private key | |
| proxy_fingerprint | SHA256 fingerprint of the proxy host public key | |
| proxy_cipher | Allowed cipher algorithms for the proxy | |
| proxy_use_insecure_cipher | Allow insecure ciphers for the proxy | false |
> **Note:** To mimic the removed `script_stop` option, add `set -e` at the top of your shell script. > **Note:** To mimic the removed `script_stop` option, add `set -e` at the top of your shell script.

View File

@ -8,6 +8,9 @@
- [目录](#目录) - [目录](#目录)
- [📖 简介](#-简介) - [📖 简介](#-简介)
- [🧩 核心概念与输入参数](#-核心概念与输入参数) - [🧩 核心概念与输入参数](#-核心概念与输入参数)
- [🔌 连接设置](#-连接设置)
- [🛠️ 指令设置](#-指令设置)
- [🌐 代理设置](#-代理设置)
- [⚡ 快速开始](#-快速开始) - [⚡ 快速开始](#-快速开始)
- [🔑 SSH 密钥配置与 OpenSSH 兼容性](#-ssh-密钥配置与-openssh-兼容性) - [🔑 SSH 密钥配置与 OpenSSH 兼容性](#-ssh-密钥配置与-openssh-兼容性)
- [配置 SSH 密钥](#配置-ssh-密钥) - [配置 SSH 密钥](#配置-ssh-密钥)
@ -52,43 +55,65 @@
详细参数请参阅 [action.yml](./action.yml)。 详细参数请参阅 [action.yml](./action.yml)。
| 参数 | 描述 | 默认值 | ### 🔌 连接设置
| ------------------------- | ----------------------------------------------------- | ------ |
| host | SSH 主机地址 | | 这些参数用于控制如何连接到远程主机。
| port | SSH 端口号 | 22 |
| passphrase | SSH 私钥密码短语 | | | 参数 | 描述 | 默认值 |
| username | SSH 用户名 | | | ------------------- | --------------------------------------------- | ------ |
| password | SSH 密码 | | | host | SSH 主机地址 | |
| protocol | SSH 协议版本(`tcp``tcp4``tcp6` | tcp | | port | SSH 端口号 | 22 |
| sync | 指定多个主机时同步执行 | false | | username | SSH 用户名 | |
| use_insecure_cipher | 允许额外(不安全)的加密算法 | false | | password | SSH 密码 | |
| cipher | 允许的加密算法,未指定时使用默认值 | | | protocol | SSH 协议版本(`tcp``tcp4``tcp6` | tcp |
| timeout | SSH 连接主机的超时时间 | 30s | | sync | 指定多个主机时同步执行 | false |
| command_timeout | SSH 命令执行超时时间 | 10m | | timeout | SSH 连接主机的超时时间 | 30s |
| key | SSH 私钥内容(如 `~/.ssh/id_rsa` 的原始内容) | | | key | SSH 私钥内容(如 `~/.ssh/id_rsa` 的原始内容) | |
| key_path | SSH 私钥路径 | | | key_path | SSH 私钥路径 | |
| fingerprint | 主机公钥的 SHA256 指纹 | | | passphrase | SSH 私钥密码短语 | |
| proxy_host | SSH 代理主机 | | | fingerprint | 主机公钥的 SHA256 指纹 | |
| proxy_port | SSH 代理端口 | 22 | | use_insecure_cipher | 允许额外(不安全)的加密算法 | false |
| proxy_protocol | SSH 代理协议版本(`tcp``tcp4``tcp6` | tcp | | cipher | 允许的加密算法,未指定时使用默认值 | |
| proxy_username | SSH 代理用户名 | |
| proxy_password | SSH 代理密码 | | ---
| proxy_passphrase | SSH 代理私钥密码短语 | |
| proxy_timeout | SSH 连接代理主机的超时时间 | 30s | ### 🛠️ 指令设置
| proxy_key | SSH 代理私钥内容 | |
| proxy_key_path | SSH 代理私钥路径 | | 这些参数用于控制在远程主机上执行的命令及相关行为。
| proxy_fingerprint | 代理主机公钥的 SHA256 指纹 | |
| proxy_cipher | 代理允许的加密算法 | | | 参数 | 描述 | 默认值 |
| proxy_use_insecure_cipher | 代理允许额外(不安全)的加密算法 | false | | --------------- | ----------------------------------------------------- | ------ |
| script | 远程执行的命令 | | | script | 远程执行的命令 | |
| script_path | 包含要执行命令的文件路径 | | | script_path | 包含要执行命令的文件路径 | |
| envs | 传递给 shell 脚本的环境变量 | | | envs | 传递给 shell 脚本的环境变量 | |
| envs_format | 环境变量传递的灵活配置 | | | envs_format | 环境变量传递的灵活配置 | |
| debug | 启用调试模式 | false | | allenvs | 传递所有带 `GITHUB_``INPUT_` 前缀的环境变量到脚本 | false |
| allenvs | 传递所有带 `GITHUB_``INPUT_` 前缀的环境变量到脚本 | false | | command_timeout | SSH 命令执行超时时间 | 10m |
| request_pty | 向服务器请求伪终端 | false | | debug | 启用调试模式 | false |
| curl_insecure | 允许 curl 连接无证书的 SSL 站点 | false | | request_pty | 向服务器请求伪终端 | false |
| version | drone-ssh 二进制版本,未指定时使用最新版本 | | | curl_insecure | 允许 curl 连接无证书的 SSL 站点 | false |
| version | drone-ssh 二进制版本,未指定时使用最新版本 | |
---
### 🌐 代理设置
这些参数用于通过代理(跳板机)连接到目标主机。
| 参数 | 描述 | 默认值 |
| ------------------------- | ----------------------------------------- | ------ |
| proxy_host | SSH 代理主机 | |
| proxy_port | SSH 代理端口 | 22 |
| proxy_username | SSH 代理用户名 | |
| proxy_password | SSH 代理密码 | |
| proxy_passphrase | SSH 代理私钥密码短语 | |
| proxy_protocol | SSH 代理协议版本(`tcp``tcp4``tcp6` | tcp |
| proxy_timeout | SSH 连接代理主机的超时时间 | 30s |
| proxy_key | SSH 代理私钥内容 | |
| proxy_key_path | SSH 代理私钥路径 | |
| proxy_fingerprint | 代理主机公钥的 SHA256 指纹 | |
| proxy_cipher | 代理允许的加密算法 | |
| proxy_use_insecure_cipher | 代理允许额外(不安全)的加密算法 | false |
> **注意:** 如需实现已移除的 `script_stop` 功能,请在 shell 脚本顶部添加 `set -e` > **注意:** 如需实现已移除的 `script_stop` 功能,请在 shell 脚本顶部添加 `set -e`

View File

@ -8,6 +8,9 @@
- [目錄](#目錄) - [目錄](#目錄)
- [📖 簡介](#-簡介) - [📖 簡介](#-簡介)
- [🧩 核心概念與輸入參數](#-核心概念與輸入參數) - [🧩 核心概念與輸入參數](#-核心概念與輸入參數)
- [🔌 連線設定](#-連線設定)
- [🛠️ 指令設定](#-指令設定)
- [🌐 代理設定](#-代理設定)
- [⚡ 快速開始](#-快速開始) - [⚡ 快速開始](#-快速開始)
- [🔑 SSH 金鑰設定與 OpenSSH 相容性](#-ssh-金鑰設定與-openssh-相容性) - [🔑 SSH 金鑰設定與 OpenSSH 相容性](#-ssh-金鑰設定與-openssh-相容性)
- [設定 SSH 金鑰](#設定-ssh-金鑰) - [設定 SSH 金鑰](#設定-ssh-金鑰)
@ -52,43 +55,65 @@
完整參數請參閱 [action.yml](./action.yml)。 完整參數請參閱 [action.yml](./action.yml)。
| 參數 | 說明 | 預設值 | ### 🔌 連線設定
| ------------------------- | ----------------------------------------------------- | ------ |
| host | SSH 主機位址 | | 這些參數用於控制如何連線到遠端主機。
| port | SSH 埠號 | 22 |
| passphrase | SSH 私鑰密碼 | | | 參數 | 說明 | 預設值 |
| username | SSH 使用者名稱 | | | ------------------- | --------------------------------------------- | ------ |
| password | SSH 密碼 | | | host | SSH 主機位址 | |
| protocol | SSH 協議版本(`tcp``tcp4``tcp6` | tcp | | port | SSH 埠號 | 22 |
| sync | 指定多個主機時同步執行 | false | | username | SSH 使用者名稱 | |
| use_insecure_cipher | 允許額外(不安全)的加密演算法 | false | | password | SSH 密碼 | |
| cipher | 允許的加密演算法,未指定時使用預設值 | | | protocol | SSH 協議版本(`tcp``tcp4``tcp6` | tcp |
| timeout | SSH 連線主機的逾時時間 | 30s | | sync | 指定多個主機時同步執行 | false |
| command_timeout | SSH 指令執行逾時時間 | 10m | | timeout | SSH 連線主機的逾時時間 | 30s |
| key | SSH 私鑰內容(如 `~/.ssh/id_rsa` 的原始內容) | | | key | SSH 私鑰內容(如 `~/.ssh/id_rsa` 的原始內容) | |
| key_path | SSH 私鑰路徑 | | | key_path | SSH 私鑰路徑 | |
| fingerprint | 主機公鑰的 SHA256 指紋 | | | passphrase | SSH 私鑰密碼 | |
| proxy_host | SSH 代理主機 | | | fingerprint | 主機公鑰的 SHA256 指紋 | |
| proxy_port | SSH 代理埠號 | 22 | | use_insecure_cipher | 允許額外(不安全)的加密演算法 | false |
| proxy_protocol | SSH 代理協議版本(`tcp``tcp4``tcp6` | tcp | | cipher | 允許的加密演算法,未指定時使用預設值 | |
| proxy_username | SSH 代理使用者名稱 | |
| proxy_password | SSH 代理密碼 | | ---
| proxy_passphrase | SSH 代理私鑰密碼 | |
| proxy_timeout | SSH 連線代理主機的逾時時間 | 30s | ### 🛠️ 指令設定
| proxy_key | SSH 代理私鑰內容 | |
| proxy_key_path | SSH 代理私鑰路徑 | | 這些參數用於控制在遠端主機上執行的指令及相關行為。
| proxy_fingerprint | 代理主機公鑰的 SHA256 指紋 | |
| proxy_cipher | 代理允許的加密演算法 | | | 參數 | 說明 | 預設值 |
| proxy_use_insecure_cipher | 代理允許額外(不安全)的加密演算法 | false | | --------------- | ----------------------------------------------------- | ------ |
| script | 遠端執行的指令 | | | script | 遠端執行的指令 | |
| script_path | 包含要執行指令的檔案路徑 | | | script_path | 包含要執行指令的檔案路徑 | |
| envs | 傳遞給 shell 腳本的環境變數 | | | envs | 傳遞給 shell 腳本的環境變數 | |
| envs_format | 環境變數傳遞的彈性設定 | | | envs_format | 環境變數傳遞的彈性設定 | |
| debug | 啟用除錯模式 | false | | allenvs | 傳遞所有帶 `GITHUB_``INPUT_` 前綴的環境變數到腳本 | false |
| allenvs | 傳遞所有帶 `GITHUB_``INPUT_` 前綴的環境變數到腳本 | false | | command_timeout | SSH 指令執行逾時時間 | 10m |
| request_pty | 向伺服器請求偽終端 | false | | debug | 啟用除錯模式 | false |
| curl_insecure | 允許 curl 連線無憑證的 SSL 網站 | false | | request_pty | 向伺服器請求偽終端 | false |
| version | drone-ssh 執行檔版本,未指定時使用最新版本 | | | curl_insecure | 允許 curl 連線無憑證的 SSL 網站 | false |
| version | drone-ssh 執行檔版本,未指定時使用最新版本 | |
---
### 🌐 代理設定
這些參數用於透過代理(跳板機)連線到目標主機。
| 參數 | 說明 | 預設值 |
| ------------------------- | ----------------------------------------- | ------ |
| proxy_host | SSH 代理主機 | |
| proxy_port | SSH 代理埠號 | 22 |
| proxy_username | SSH 代理使用者名稱 | |
| proxy_password | SSH 代理密碼 | |
| proxy_passphrase | SSH 代理私鑰密碼 | |
| proxy_protocol | SSH 代理協議版本(`tcp``tcp4``tcp6` | tcp |
| proxy_timeout | SSH 連線代理主機的逾時時間 | 30s |
| proxy_key | SSH 代理私鑰內容 | |
| proxy_key_path | SSH 代理私鑰路徑 | |
| proxy_fingerprint | 代理主機公鑰的 SHA256 指紋 | |
| proxy_cipher | 代理允許的加密演算法 | |
| proxy_use_insecure_cipher | 代理允許額外(不安全)的加密演算法 | false |
> **注意:** 如需實現已移除的 `script_stop` 功能,請在 shell 腳本最上方加上 `set -e` > **注意:** 如需實現已移除的 `script_stop` 功能,請在 shell 腳本最上方加上 `set -e`