From f05aefe3514f74f9cda4825a2a5d9905aa45ae2a Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 5 Jun 2024 15:59:32 +0800 Subject: [PATCH] ci: enhance SSH action configuration and error handling - Add a step to stop the script if a command error occurs using `appleboy/ssh-action@v1.0.3` - Configure SSH action with host, username, password, key, port, and other parameters - Add script to create a directory and list its contents Signed-off-by: Bo-Yi Wu --- .github/workflows/ssh-server.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ssh-server.yml b/.github/workflows/ssh-server.yml index cfe805c..837dd0a 100644 --- a/.github/workflows/ssh-server.yml +++ b/.github/workflows/ssh-server.yml @@ -110,3 +110,19 @@ jobs: key: password port: 2222 script: whoami + + - name: stop script if command error + uses: appleboy/ssh-action@v1.0.3 + 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