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