Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(action): remove script stop functionality from project #350

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,6 @@ jobs:
port: 2222
script: whoami

- name: stop script if command error
uses: ./
continue-on-error: true
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
password: password
key: password
port: 2222
script_stop: true
sync: true
debug: true
script: |
mkdir abc/def
ls -al

support-key-passphrase:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -215,7 +199,6 @@ jobs:
key: ${{ env.PRIVATE_KEY }}
port: 2222
passphrase: 1234
script_stop: true
script: |
ls \
-lah
Expand Down Expand Up @@ -292,7 +275,6 @@ jobs:
username: linuxserver.io
key: ${{ env.PRIVATE_KEY }}
passphrase: 1234
script_stop: true
script: |
whoami

Expand Down Expand Up @@ -488,7 +470,6 @@ jobs:
username: linuxserver.io
key: ${{ env.PRIVATE_KEY }}
port: 2222
script_stop: true
request_pty: true
command_timeout: 30s
script: |
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,6 @@ jobs:
port: 2222
script: whoami

- name: stop script if command error
uses: appleboy/[email protected]
continue-on-error: true
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
password: password
key: password
port: 2222
script_stop: true
sync: true
debug: true
script: |
mkdir abc/def
ls -al

support-key-passphrase:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -215,7 +199,6 @@ jobs:
key: ${{ env.PRIVATE_KEY }}
port: 2222
passphrase: 1234
script_stop: true
script: |
ls \
-lah
Expand Down Expand Up @@ -292,7 +275,6 @@ jobs:
username: linuxserver.io
key: ${{ env.PRIVATE_KEY }}
passphrase: 1234
script_stop: true
script: |
whoami

Expand Down Expand Up @@ -478,7 +460,6 @@ jobs:
username: linuxserver.io
key: ${{ env.PRIVATE_KEY }}
port: 2222
script_stop: true
request_pty: true
command_timeout: 30s
script: |
Expand Down
32 changes: 0 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ See [action.yml](./action.yml) for more detailed information.
| proxy_use_insecure_cipher | Include more ciphers with use_insecure_cipher for the proxy | false |
| script | Execute commands | |
| script_file | Execute commands from a file | |
| script_stop | Stop script after first failure | false |
| envs | Pass environment variables to shell script | |
| envs_format | Flexible configuration of environment value transfer | |
| debug | Enable debug mode | false |
Expand Down Expand Up @@ -304,37 +303,6 @@ The default value of `port` is `22`.

_Inside `env` object, you need to pass every environment variable as a string, passing `Integer` data type or any other may output unexpected results._

#### Stop script after first failure

> ex: missing `abc` folder

```diff
- name: stop script if command error
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
+ script_stop: true
script: |
mkdir abc/def
ls -al
```

output:

```sh
======CMD======
mkdir abc/def
ls -al

======END======
2019/11/21 01:16:21 Process exited with status 1
err: mkdir: cannot create directory ‘abc/def’: No such file or directory
##[error]Docker run failed with exit code 1
```

#### How to connect remote server using `ProxyCommand`?

```bash
Expand Down
32 changes: 0 additions & 32 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
| proxy_use_insecure_cipher | 使用不安全的密码算法 | false |
| script | 执行命令 | |
| script_file | 从文件执行命令 | |
| script_stop | 在第一次失败后停止脚本 | false |
| envs | 传递环境变量到 shell 脚本 | |
| envs_format | 环境变量传递的灵活配置 | |
| debug | 启用调试模式 | false |
Expand Down Expand Up @@ -285,37 +284,6 @@ ssh-keygen -t ed25519 -a 200 -C ”[email protected]

_在 `env` 对象中,您需要将每个环境变量作为字符串传递,传递 `Integer` 数据类型或任何其他类型可能会产生意外结果。_

#### 在第一次失败后停止脚本

> ex: missing `abc` folder

```diff
- name: stop script if command error
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
+ script_stop: true
script: |
mkdir abc/def
ls -al
```

画面输出:

```sh
======CMD======
mkdir abc/def
ls -al

======END======
2019/11/21 01:16:21 Process exited with status 1
err: mkdir: cannot create directory ‘abc/def’: No such file or directory
##[error]Docker run failed with exit code 1
```

#### 如何使用 `ProxyCommand` 连接远程服务器?

```bash
Expand Down
32 changes: 0 additions & 32 deletions README.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
| proxy_use_insecure_cipher | 包含更多不安全的加密算法 | false |
| script | 執行命令 | |
| script_file | 從文件中執行命令 | |
| script_stop | 在第一次失敗後停止腳本 | false |
| envs | 將環境變數傳遞給 shell 腳本 | |
| envs_format | 環境值傳遞的靈活配置 | |
| debug | 啟用調試模式 | false |
Expand Down Expand Up @@ -285,37 +284,6 @@ ssh-keygen -t ed25519 -a 200 -C "[email protected]"

_在 `env` 對象中,您需要將每個環境變量作為字符串傳遞,傳遞 `Integer` 數據類型或任何其他類型可能會產生意外結果。_

#### 在第一次失敗後停止腳本

> ex: missing `abc` folder

```diff
- name: stop script if command error
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
+ script_stop: true
script: |
mkdir abc/def
ls -al
```

畫面輸出:

```sh
======CMD======
mkdir abc/def
ls -al

======END======
2019/11/21 01:16:21 Process exited with status 1
err: mkdir: cannot create directory ‘abc/def’: No such file or directory
##[error]Docker run failed with exit code 1
```

#### 如何使用 `ProxyCommand` 連接遠程服務器?

```bash
Expand Down
3 changes: 0 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ inputs:
description: "Commands to be executed."
script_path:
description: "Path to the file containing commands to be executed."
script_stop:
description: "Stop the script after the first failure."
envs:
description: "Environment variables to be passed to the shell script."
envs_format:
Expand Down Expand Up @@ -113,7 +111,6 @@ runs:
INPUT_COMMAND_TIMEOUT: ${{ inputs.command_timeout }}
INPUT_SCRIPT: ${{ inputs.script }}
INPUT_SCRIPT_FILE: ${{ inputs.script_path }}
INPUT_SCRIPT_STOP: ${{ inputs.script_stop }}
INPUT_ENVS: ${{ inputs.envs }}
INPUT_ENVS_FORMAT: ${{ inputs.envs_format }}
INPUT_DEBUG: ${{ inputs.debug }}
Expand Down
Loading