Add logs
This commit is contained in:
@@ -32,7 +32,9 @@ jobs:
|
|||||||
- name: Test SSH connection
|
- name: Test SSH connection
|
||||||
run: |
|
run: |
|
||||||
ip=$(docker inspect ssh-server-test | jq -r '.[0].NetworkSettings.Networks."test-net".IPAddress')
|
ip=$(docker inspect ssh-server-test | jq -r '.[0].NetworkSettings.Networks."test-net".IPAddress')
|
||||||
|
echo "Server IP: $ip"
|
||||||
output=$(docker run --rm --network test-net alpine sh -c "apk add --no-cache openssh-client >/dev/null 2>&1 && ssh -p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 root@$ip 'echo test559920' 2>/dev/null")
|
output=$(docker run --rm --network test-net alpine sh -c "apk add --no-cache openssh-client >/dev/null 2>&1 && ssh -p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 root@$ip 'echo test559920' 2>/dev/null")
|
||||||
|
echo "Captured output: '$output'"
|
||||||
if echo "$output" | grep -q "test559920"; then
|
if echo "$output" | grep -q "test559920"; then
|
||||||
echo "SSH connection test passed"
|
echo "SSH connection test passed"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user