From 88383898baf5e9af52c35a48a2bea622b87299d6 Mon Sep 17 00:00:00 2001 From: resonic-user Date: Thu, 19 Jun 2025 23:52:22 +0200 Subject: [PATCH] wait --- .github/workflows/cache-verify.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cache-verify.yml b/.github/workflows/cache-verify.yml index 9e0cc5bc8..b1ead65f7 100644 --- a/.github/workflows/cache-verify.yml +++ b/.github/workflows/cache-verify.yml @@ -245,16 +245,17 @@ jobs: local max=20 echo "⏳ Waiting for $name ($url)..." for i in $(seq 1 "$max"); do - if curl -sf "$url"; then - echo "✅ $name is ready" + status=$(curl -s -o /dev/null -w "%{http_code}" "$url") + if [ "$status" -lt 500 ]; then + echo "✅ $name responded with HTTP $status" return 0 fi - echo "Waiting for $name... ($i/$max)" + echo "Waiting for $name... ($i/$max), last HTTP $status" sleep 2 done - echo "❌ Timeout: $name did not respond at $url – continuing anyway" + echo "❌ Timeout: $name did not respond successfully at $url" docker compose logs || echo "(docker logs failed)" - return 0 + return 1 } # Lade die kopierten .env-Dateien in Shell-Variablen