Compare commits

...

3 Commits

Author SHA1 Message Date
appleboy
a9e2fdf08d
docs(readme): improve README structure and add new input variables
- Update title to remove redundant "用於"
- Add links to English and Simplified Chinese versions of the README
- Add a note about the project using Golang and drone-ssh
- Replace detailed input variable descriptions with a table format
- Add new input variables `protocol`, `proxy_protocol`, `envs_format`, `allenvs`, and `request_pty`
- Update usage section to refer to `action.yml` for detailed information

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-11-17 16:00:24 +08:00
appleboy
cec69ef231
docs(readme): standardize terminology and capitalization across project
- Capitalize "SSH" in multiple instances for consistency
- Change "This thing" to "This project" for clarity and professionalism
- Capitalize "Pass" in the description of the `allenvs` option

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-11-17 15:53:54 +08:00
appleboy
a8952ebe2a
docs(readme): update documentation for GitHub Actions and Docker support
- Update README badges to reflect the new GitHub Actions workflow
- Remove outdated information about Linux Docker container support in README files

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-11-17 15:51:42 +08:00
3 changed files with 51 additions and 48 deletions

View File

@ -3,15 +3,13 @@
[繁體中文](./README.zh-tw.md) [繁體中文](./README.zh-tw.md)
[简体中文](./README.zh-cn.md) [简体中文](./README.zh-cn.md)
[GitHub Action](https://github.com/features/actions) for executing remote ssh commands. [GitHub Action](https://github.com/features/actions) for executing remote SSH commands.
![ssh workflow](./images/ssh-workflow.png) ![ssh workflow](./images/ssh-workflow.png)
[![Actions Status](https://github.com/appleboy/ssh-action/workflows/remote%20ssh%20command/badge.svg)](https://github.com/appleboy/ssh-action/actions) [![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)
**Important**: Only support **Linux** [docker](https://www.docker.com/) container. This project is built using [Golang](https://go.dev) and [drone-ssh](https://github.com/appleboy/drone-ssh). 🚀
This thing is built using [Golang](https://go.dev) and [drone-ssh](https://github.com/appleboy/drone-ssh). 🚀
## Input variables ## Input variables
@ -51,12 +49,12 @@ See [action.yml](./action.yml) for more detailed information.
| envs | Pass environment variables to shell script | | | envs | Pass environment variables to shell script | |
| envs_format | Flexible configuration of environment value transfer | | | envs_format | Flexible configuration of environment value transfer | |
| debug | Enable debug mode | false | | debug | Enable debug mode | false |
| allenvs | pass the environment variables with prefix value of `GITHUB_` and `INPUT_` to the script | false | | allenvs | Pass the environment variables with prefix value of `GITHUB_` and `INPUT_` to the script | false |
| request_pty | Request a pseudo-terminal from the server | false | | request_pty | Request a pseudo-terminal from the server | false |
## Usage ## Usage
Executing remote ssh commands. Executing remote SSH commands.
```yaml ```yaml
name: remote ssh command name: remote ssh command

View File

@ -4,9 +4,7 @@
![ssh workflow](./images/ssh-workflow.png) ![ssh workflow](./images/ssh-workflow.png)
[![Actions Status](https://github.com/appleboy/ssh-action/workflows/remote%20ssh%20command/badge.svg)](https://github.com/appleboy/ssh-action/actions) [![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)
**注意** 只支持在 **Linux** [docker](https://www.docker.com/) 容器上执行。
## 输入变量 ## 输入变量

View File

@ -1,51 +1,58 @@
# 🚀 用於 GitHub Actions 的 SSH # 🚀 GitHub Actions 的 SSH
[GitHub Action](https://github.com/features/actions) for executing remote ssh commands. [English](./README.md)
[简体中文](./README.zh-cn.md)
[GitHub Action](https://github.com/features/actions) 用於執行遠端 SSH 命令。
![ssh workflow](./images/ssh-workflow.png) ![ssh workflow](./images/ssh-workflow.png)
[![Actions Status](https://github.com/appleboy/ssh-action/workflows/remote%20ssh%20command/badge.svg)](https://github.com/appleboy/ssh-action/actions) [![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)
**注意** 只支援在 **Linux** [docker](https://www.docker.com/) 容器上執行。 此專案使用 [Golang](https://go.dev) 和 [drone-ssh](https://github.com/appleboy/drone-ssh) 建立。🚀
## 輸入變數 ## 輸入變數
更詳細的資訊,請參閱 [action.yml](./action.yml)。 請參閱 [action.yml](./action.yml) 以獲取更詳細的信息
* `host` - SSH 主機 | 輸入參數 | 描述 | 預設值 |
* `port` - SSH 連接埠,預設為 `22` | ------------------------- | ----------------------------------------------------- | ------ |
* `username` - SSH 使用者名稱 | host | SSH 主機地址 | |
* `password` - SSH 密碼 | port | SSH 埠號 | 22 |
* `passphrase` - 通常用於加密私鑰的 passphrase | passphrase | SSH 金鑰密碼 | |
* `sync` - 同步執行多個主機上的命令,預設為 false | username | SSH 使用者名稱 | |
* `timeout` - SSH 連接到遠端主機的超時時間,預設為 `30s` | password | SSH 密碼 | |
* `command_timeout` - SSH 命令超時時間,預設為 10m | protocol | SSH 協議版本 (tcp, tcp4, tcp6) | tcp |
* `key` - SSH 私鑰的內容,例如 ~/.ssh/id_rsa 的原始內容,請記得包含 BEGIN 和 END 行 | sync | 如果有多個主機,啟用同步執行 | false |
* `key_path` - SSH 私鑰的路徑 | use_insecure_cipher | 包含更多不安全的加密算法 | false |
* `fingerprint` - 主機公鑰的 SHA256 指紋,預設為略過驗證 | cipher | 允許的加密算法。如果未指定,則使用合理的預設值 | |
* `script` - 執行命令 | timeout | SSH 連接主機的超時時間 | 30s |
* `script_file` - 執行命令的文件 | command_timeout | SSH 命令的超時時間 | 10m |
* `script_stop` - 當出現第一個錯誤時停止執行命令 | key | SSH 私鑰的內容。例如,~/.ssh/id_rsa 的原始內容 | |
* `envs` - 傳遞環境變數到 shell script | key_path | SSH 私鑰的路徑 | |
* `debug` - 啟用偵錯模式 | fingerprint | 主機公鑰的 SHA256 指紋 | |
* `use_insecure_cipher` - 使用不安全的密碼ciphers進行加密參見 [#56](https://github.com/appleboy/ssh-action/issues/56) | proxy_host | SSH 代理主機 | |
* `cipher` - 允許使用的密碼ciphers演算法。如果未指定則使用適當的演算法 | proxy_port | SSH 代理埠號 | 22 |
| proxy_protocol | SSH 代理協議版本 (tcp, tcp4, tcp6) | tcp |
| 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_file | 從文件中執行命令 | |
| script_stop | 在第一次失敗後停止腳本 | false |
| envs | 將環境變數傳遞給 shell 腳本 | |
| envs_format | 環境值傳遞的靈活配置 | |
| debug | 啟用調試模式 | false |
| allenvs | 將帶有 `GITHUB_``INPUT_` 前綴的環境變數傳遞給腳本 | false |
| request_pty | 從伺服器請求偽終端 | false |
SSH 代理設置: ## 用法
* `proxy_host` - 代理主機
* `proxy_port` - 代理端口,預設為 `22`
* `proxy_username` - 代理使用者名稱
* `proxy_password` - 代理密碼
* `proxy_passphrase` - 密碼通常用於加密私有金鑰
* `proxy_timeout` - SSH 連線至代理主機的逾時時間,預設為 `30s`
* `proxy_key` - SSH 代理私有金鑰內容
* `proxy_key_path` - SSH 代理私有金鑰路徑
* `proxy_fingerprint` - 代理主機公鑰的 SHA256 指紋,預設為跳過驗證
* `proxy_use_insecure_cipher` - 使用不安全的加密方式,請參閱 [#56](https://github.com/appleboy/ssh-action/issues/56)
* `proxy_cipher` - 允許的加密算法。如果未指定,則使用合理的算法
## 使用方式
執行遠端 SSH 命令 執行遠端 SSH 命令