mirror of
				https://github.com/appleboy/ssh-action.git
				synced 2025-10-31 16:23:52 +00:00 
			
		
		
		
	ci(action): remove script stop functionality from project (#350)
- Remove the `stop script if command error` step from GitHub workflows - Remove the `script_stop` option from the README and its translations - Remove the `script_stop` input from `action.yml` Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
		
							parent
							
								
									48531853a7
								
							
						
					
					
						commit
						1c1ad10f6d
					
				
							
								
								
									
										19
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							| @ -123,22 +123,6 @@ jobs: | |||||||
|           port: 2222 |           port: 2222 | ||||||
|           script: whoami |           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: |   support-key-passphrase: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
| @ -215,7 +199,6 @@ jobs: | |||||||
|           key: ${{ env.PRIVATE_KEY }} |           key: ${{ env.PRIVATE_KEY }} | ||||||
|           port: 2222 |           port: 2222 | ||||||
|           passphrase: 1234 |           passphrase: 1234 | ||||||
|           script_stop: true |  | ||||||
|           script: | |           script: | | ||||||
|             ls \ |             ls \ | ||||||
|               -lah |               -lah | ||||||
| @ -292,7 +275,6 @@ jobs: | |||||||
|           username: linuxserver.io |           username: linuxserver.io | ||||||
|           key: ${{ env.PRIVATE_KEY }} |           key: ${{ env.PRIVATE_KEY }} | ||||||
|           passphrase: 1234 |           passphrase: 1234 | ||||||
|           script_stop: true |  | ||||||
|           script: | |           script: | | ||||||
|             whoami |             whoami | ||||||
| 
 | 
 | ||||||
| @ -488,7 +470,6 @@ jobs: | |||||||
|           username: linuxserver.io |           username: linuxserver.io | ||||||
|           key: ${{ env.PRIVATE_KEY }} |           key: ${{ env.PRIVATE_KEY }} | ||||||
|           port: 2222 |           port: 2222 | ||||||
|           script_stop: true |  | ||||||
|           request_pty: true |           request_pty: true | ||||||
|           command_timeout: 30s |           command_timeout: 30s | ||||||
|           script: | |           script: | | ||||||
|  | |||||||
							
								
								
									
										19
									
								
								.github/workflows/stable.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/stable.yml
									
									
									
									
										vendored
									
									
								
							| @ -123,22 +123,6 @@ jobs: | |||||||
|           port: 2222 |           port: 2222 | ||||||
|           script: whoami |           script: whoami | ||||||
| 
 | 
 | ||||||
|       - name: stop script if command error |  | ||||||
|         uses: appleboy/ssh-action@v1.2.0 |  | ||||||
|         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: |   support-key-passphrase: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
| @ -215,7 +199,6 @@ jobs: | |||||||
|           key: ${{ env.PRIVATE_KEY }} |           key: ${{ env.PRIVATE_KEY }} | ||||||
|           port: 2222 |           port: 2222 | ||||||
|           passphrase: 1234 |           passphrase: 1234 | ||||||
|           script_stop: true |  | ||||||
|           script: | |           script: | | ||||||
|             ls \ |             ls \ | ||||||
|               -lah |               -lah | ||||||
| @ -292,7 +275,6 @@ jobs: | |||||||
|           username: linuxserver.io |           username: linuxserver.io | ||||||
|           key: ${{ env.PRIVATE_KEY }} |           key: ${{ env.PRIVATE_KEY }} | ||||||
|           passphrase: 1234 |           passphrase: 1234 | ||||||
|           script_stop: true |  | ||||||
|           script: | |           script: | | ||||||
|             whoami |             whoami | ||||||
| 
 | 
 | ||||||
| @ -478,7 +460,6 @@ jobs: | |||||||
|           username: linuxserver.io |           username: linuxserver.io | ||||||
|           key: ${{ env.PRIVATE_KEY }} |           key: ${{ env.PRIVATE_KEY }} | ||||||
|           port: 2222 |           port: 2222 | ||||||
|           script_stop: true |  | ||||||
|           request_pty: true |           request_pty: true | ||||||
|           command_timeout: 30s |           command_timeout: 30s | ||||||
|           script: | |           script: | | ||||||
|  | |||||||
							
								
								
									
										32
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								README.md
									
									
									
									
									
								
							| @ -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         | | | proxy_use_insecure_cipher | Include more ciphers with use_insecure_cipher for the proxy                              | false         | | ||||||
| | script                    | Execute commands                                                                         |               | | | script                    | Execute commands                                                                         |               | | ||||||
| | script_file               | Execute commands from a file                                                             |               | | | script_file               | Execute commands from a file                                                             |               | | ||||||
| | script_stop               | Stop script after first failure                                                          | false         | |  | ||||||
| | 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         | | ||||||
| @ -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._ | _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/ssh-action@v1.2.0 |  | ||||||
|     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`? | #### How to connect remote server using `ProxyCommand`? | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
|  | |||||||
| @ -44,7 +44,6 @@ | |||||||
| | proxy_use_insecure_cipher | 使用不安全的密码算法                                  | false  | | | proxy_use_insecure_cipher | 使用不安全的密码算法                                  | false  | | ||||||
| | script                    | 执行命令                                              |        | | | script                    | 执行命令                                              |        | | ||||||
| | script_file               | 从文件执行命令                                        |        | | | script_file               | 从文件执行命令                                        |        | | ||||||
| | script_stop               | 在第一次失败后停止脚本                                | false  | |  | ||||||
| | envs                      | 传递环境变量到 shell 脚本                             |        | | | envs                      | 传递环境变量到 shell 脚本                             |        | | ||||||
| | envs_format               | 环境变量传递的灵活配置                                |        | | | envs_format               | 环境变量传递的灵活配置                                |        | | ||||||
| | debug                     | 启用调试模式                                          | false  | | | debug                     | 启用调试模式                                          | false  | | ||||||
| @ -285,37 +284,6 @@ ssh-keygen -t ed25519 -a 200 -C ”your_email@example.com“ | |||||||
| 
 | 
 | ||||||
| _在 `env` 对象中,您需要将每个环境变量作为字符串传递,传递 `Integer` 数据类型或任何其他类型可能会产生意外结果。_ | _在 `env` 对象中,您需要将每个环境变量作为字符串传递,传递 `Integer` 数据类型或任何其他类型可能会产生意外结果。_ | ||||||
| 
 | 
 | ||||||
| #### 在第一次失败后停止脚本 |  | ||||||
| 
 |  | ||||||
| > ex: missing `abc` folder |  | ||||||
| 
 |  | ||||||
| ```diff |  | ||||||
|   - name: stop script if command error |  | ||||||
|     uses: appleboy/ssh-action@v1.2.0 |  | ||||||
|     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` 连接远程服务器? | #### 如何使用 `ProxyCommand` 连接远程服务器? | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
|  | |||||||
| @ -44,7 +44,6 @@ | |||||||
| | proxy_use_insecure_cipher | 包含更多不安全的加密算法                              | false  | | | proxy_use_insecure_cipher | 包含更多不安全的加密算法                              | false  | | ||||||
| | script                    | 執行命令                                              |        | | | script                    | 執行命令                                              |        | | ||||||
| | script_file               | 從文件中執行命令                                      |        | | | script_file               | 從文件中執行命令                                      |        | | ||||||
| | script_stop               | 在第一次失敗後停止腳本                                | false  | |  | ||||||
| | envs                      | 將環境變數傳遞給 shell 腳本                           |        | | | envs                      | 將環境變數傳遞給 shell 腳本                           |        | | ||||||
| | envs_format               | 環境值傳遞的靈活配置                                  |        | | | envs_format               | 環境值傳遞的靈活配置                                  |        | | ||||||
| | debug                     | 啟用調試模式                                          | false  | | | debug                     | 啟用調試模式                                          | false  | | ||||||
| @ -285,37 +284,6 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com" | |||||||
| 
 | 
 | ||||||
| _在 `env` 對象中,您需要將每個環境變量作為字符串傳遞,傳遞 `Integer` 數據類型或任何其他類型可能會產生意外結果。_ | _在 `env` 對象中,您需要將每個環境變量作為字符串傳遞,傳遞 `Integer` 數據類型或任何其他類型可能會產生意外結果。_ | ||||||
| 
 | 
 | ||||||
| #### 在第一次失敗後停止腳本 |  | ||||||
| 
 |  | ||||||
| > ex: missing `abc` folder |  | ||||||
| 
 |  | ||||||
| ```diff |  | ||||||
|   - name: stop script if command error |  | ||||||
|     uses: appleboy/ssh-action@v1.2.0 |  | ||||||
|     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` 連接遠程服務器? | #### 如何使用 `ProxyCommand` 連接遠程服務器? | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
|  | |||||||
| @ -65,8 +65,6 @@ inputs: | |||||||
|     description: "Commands to be executed." |     description: "Commands to be executed." | ||||||
|   script_path: |   script_path: | ||||||
|     description: "Path to the file containing commands to be executed." |     description: "Path to the file containing commands to be executed." | ||||||
|   script_stop: |  | ||||||
|     description: "Stop the script after the first failure." |  | ||||||
|   envs: |   envs: | ||||||
|     description: "Environment variables to be passed to the shell script." |     description: "Environment variables to be passed to the shell script." | ||||||
|   envs_format: |   envs_format: | ||||||
| @ -113,7 +111,6 @@ runs: | |||||||
|         INPUT_COMMAND_TIMEOUT: ${{ inputs.command_timeout }} |         INPUT_COMMAND_TIMEOUT: ${{ inputs.command_timeout }} | ||||||
|         INPUT_SCRIPT: ${{ inputs.script }} |         INPUT_SCRIPT: ${{ inputs.script }} | ||||||
|         INPUT_SCRIPT_FILE: ${{ inputs.script_path }} |         INPUT_SCRIPT_FILE: ${{ inputs.script_path }} | ||||||
|         INPUT_SCRIPT_STOP: ${{ inputs.script_stop }} |  | ||||||
|         INPUT_ENVS: ${{ inputs.envs }} |         INPUT_ENVS: ${{ inputs.envs }} | ||||||
|         INPUT_ENVS_FORMAT: ${{ inputs.envs_format }} |         INPUT_ENVS_FORMAT: ${{ inputs.envs_format }} | ||||||
|         INPUT_DEBUG: ${{ inputs.debug }} |         INPUT_DEBUG: ${{ inputs.debug }} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user