diff --git a/.gitea/workflows/build-and-push.yml b/.gitea/workflows/build-and-push.yml index a767bb0..975fc78 100644 --- a/.gitea/workflows/build-and-push.yml +++ b/.gitea/workflows/build-and-push.yml @@ -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