Fix action
This commit is contained in:
@@ -18,10 +18,13 @@ jobs:
|
||||
|
||||
- name: Run SSH server
|
||||
run: |
|
||||
docker run --rm -d --name ssh-server-test -p 2223:22 -e COMMAND="echo 'SSH connection successful'" ssh-server-test
|
||||
|
||||
- name: Wait for server to start
|
||||
run: sleep 5
|
||||
docker run -d --name ssh-server-test -p 2223:22 -e COMMAND="/bin/sh" ssh-server-test
|
||||
sleep 2
|
||||
if ! docker ps | grep -q ssh-server-test; then
|
||||
echo "Container failed to start"
|
||||
docker logs ssh-server-test
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Test SSH connection
|
||||
run: |
|
||||
@@ -32,6 +35,7 @@ jobs:
|
||||
echo "SSH connection test failed"
|
||||
exit 1
|
||||
fi
|
||||
docker stop ssh-server-test && docker rm ssh-server-test
|
||||
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user