Skip to content

Commit

Permalink
ci: enhance SSH action configuration and error handling
Browse files Browse the repository at this point in the history
- 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 <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Jun 5, 2024
1 parent acd41e5 commit f05aefe
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ssh-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f05aefe

Please sign in to comment.