Skip to content

Commit ffd1eec

Browse files
authored
ci: add workflow step for multi-command SSH testing (#386)
- Add a workflow step to run multiple SSH commands for testing, including creating a directory, writing a file, listing files, and displaying file contents Signed-off-by: appleboy <[email protected]>
1 parent 8745f95 commit ffd1eec

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@ jobs:
5151
port: 2222
5252
script_path: testdata/test.sh
5353

54+
# https://github.com/appleboy/ssh-action/issues/377
55+
- name: multiple commands
56+
uses: ./
57+
with:
58+
host: ${{ env.REMOTE_HOST }}
59+
username: linuxserver.io
60+
password: password
61+
port: 2222
62+
script: |
63+
mkdir -p /tmp/test
64+
echo "hello world" > /tmp/test/hello.txt
65+
cd /tmp/test
66+
ls -al
67+
cat /tmp/test/hello.txt
68+
5469
check-ssh-key:
5570
runs-on: ubuntu-latest
5671
steps:

0 commit comments

Comments
 (0)