From 43bc00a4a6cadca96a968e10dcf7a6099366d483 Mon Sep 17 00:00:00 2001 From: dcorral Date: Thu, 6 Nov 2025 21:08:11 +0100 Subject: [PATCH] Ignore ssh warning on test --- .gitea/workflows/build-and-push.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build-and-push.yml b/.gitea/workflows/build-and-push.yml index 9781497..9162c79 100644 --- a/.gitea/workflows/build-and-push.yml +++ b/.gitea/workflows/build-and-push.yml @@ -30,11 +30,11 @@ jobs: - name: Test SSH connection run: | - 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@ssh-server-test 'echo test'") - if [ "$output" = "test" ]; then + 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@ssh-server-test 'echo test559920'") + if echo "$output" | grep -q "test559920"; then echo "SSH connection test passed" else - echo "SSH connection test failed" + echo "SSH connection test failed: $output" exit 1 fi docker stop ssh-server-test && docker rm ssh-server-test && docker network rm test-net