Call to container ip
This commit is contained in:
@@ -29,7 +29,8 @@ jobs:
|
||||
|
||||
- name: Test SSH connection
|
||||
run: |
|
||||
output=$(ssh -p 2223 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@127.0.0.1 "echo test")
|
||||
ip=$(docker inspect ssh-server-test | jq -r '.[0].NetworkSettings.IPAddress')
|
||||
output=$(ssh -p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$ip "echo test")
|
||||
if [ "$output" = "test" ]; then
|
||||
echo "SSH connection test passed"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user