Skip to content

Commit 6137f73

Browse files
committed
docs: improve project documentation and organization
- Add a project description mentioning the use of Golang and drone-ssh - Replace the list of input variables with a table format for better readability and organization Signed-off-by: appleboy <appleboy.tw@gmail.com>
1 parent 43d4ebb commit 6137f73

File tree

1 file changed

+38
-32
lines changed

1 file changed

+38
-32
lines changed

README.zh-cn.md

+38-32
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,48 @@
66

77
[![testing main branch](https://github.com/appleboy/ssh-action/actions/workflows/main.yml/badge.svg)](https://github.com/appleboy/ssh-action/actions/workflows/main.yml)
88

9+
该项目使用 [Golang](https://go.dev)[drone-ssh](https://github.com/appleboy/drone-ssh) 构建。🚀
10+
911
## 输入变量
1012

1113
更详细的信息,请参考 [action.yml](./action.yml)
1214

13-
* `host` - SSH 主机
14-
* `port` - SSH 连接端口,默认为 `22`
15-
* `username` - SSH 用户名称
16-
* `password` - SSH 密码
17-
* `passphrase` - 通常用于加密私钥的 passphrase
18-
* `sync` - 同步执行多个主机上的命令,默认为 false
19-
* `timeout` - SSH 连接到远程主机的超时时间,默认为 `30s`
20-
* `command_timeout` - SSH 命令超时时间,默认为 10m
21-
* `key` - SSH 私钥的内容,例如 ~/.ssh/id_rsa 的原始内容,请记得包含 BEGIN 和 END 行
22-
* `key_path` - SSH 私钥的路径
23-
* `fingerprint` - 主机公钥的 SHA256 指纹,默认为跳过验证
24-
* `script` - 执行命令
25-
* `script_file` - 執行命令的文件
26-
* `script_stop` - 当出现第一个错误时停止执行命令
27-
* `envs` - 传递环境变量到 shell script
28-
* `debug` - 启用调试模式
29-
* `use_insecure_cipher` - 使用不安全的密码(ciphers)进行加密,详见 [#56](https://github.com/appleboy/ssh-action/issues/56)
30-
* `cipher` - 允许使用的密码(ciphers)算法。如果未指定,则使用适当的算法
31-
32-
SSH 代理设置:
33-
34-
* `proxy_host` - 代理主机
35-
* `proxy_port` - 代理端口,默认为 `22`
36-
* `proxy_username` - 代理用户名
37-
* `proxy_password` - 代理密码
38-
* `proxy_passphrase` - 密码通常用于加密私有密钥
39-
* `proxy_timeout` - SSH 连接至代理主机的超时时间,默认为 `30s`
40-
* `proxy_key` - SSH 代理私有密钥内容
41-
* `proxy_key_path` - SSH 代理私有密钥路径
42-
* `proxy_fingerprint` - 代理主机公钥的 SHA256 指纹,默认为跳过验证
43-
* `proxy_use_insecure_cipher` - 使用不安全的加密方式,详见 [#56](https://github.com/appleboy/ssh-action/issues/56)
44-
* `proxy_cipher` - 允许的加密算法。如果未指定,则使用合理的算法
15+
| 输入参数 | 描述 | 默认值 |
16+
| ------------------------- | ----------------------------------------------------- | ------ |
17+
| host | SSH 主机地址 | |
18+
| port | SSH 端口号 | 22 |
19+
| passphrase | SSH 密钥密码短语 | |
20+
| username | SSH 用户名 | |
21+
| password | SSH 密码 | |
22+
| protocol | SSH 协议版本(tcp, tcp4, tcp6) | tcp |
23+
| sync | 如果有多个主机,启用同步执行 | false |
24+
| use_insecure_cipher | 使用不安全的密码算法 | false |
25+
| cipher | 允许的密码算法。如果未指定,则使用适当的算法 | |
26+
| timeout | SSH 连接到主机的超时时间 | 30s |
27+
| command_timeout | SSH 命令的超时时间 | 10m |
28+
| key | SSH 私钥的内容,例如 ~/.ssh/id_rsa 的原始内容 | |
29+
| key_path | SSH 私钥的路径 | |
30+
| fingerprint | 主机公钥的 SHA256 指纹 | |
31+
| proxy_host | SSH 代理主机 | |
32+
| proxy_port | SSH 代理端口 | 22 |
33+
| proxy_protocol | SSH 代理协议版本(tcp, tcp4, tcp6) | tcp |
34+
| proxy_username | SSH 代理用户名 | |
35+
| proxy_password | SSH 代理密码 | |
36+
| proxy_passphrase | SSH 代理密钥密码短语 | |
37+
| proxy_timeout | SSH 连接到代理主机的超时时间 | 30s |
38+
| proxy_key | SSH 代理私钥的内容 | |
39+
| proxy_key_path | SSH 代理私钥的路径 | |
40+
| proxy_fingerprint | 代理主机公钥的 SHA256 指纹 | |
41+
| proxy_cipher | 代理允许的密码算法 | |
42+
| proxy_use_insecure_cipher | 使用不安全的密码算法 | false |
43+
| script | 执行命令 | |
44+
| script_file | 从文件执行命令 | |
45+
| script_stop | 在第一次失败后停止脚本 | false |
46+
| envs | 传递环境变量到 shell 脚本 | |
47+
| envs_format | 环境变量传递的灵活配置 | |
48+
| debug | 启用调试模式 | false |
49+
| allenvs | 将带有 `GITHUB_``INPUT_` 前缀的环境变量传递给脚本 | false |
50+
| request_pty | 请求伪终端 | false |
4551

4652
## 使用方法
4753

0 commit comments

Comments
 (0)