diff --git a/.github/workflows/script/re-pull.sh b/.github/workflows/script/re-pull.sh index 8097813..7c19ae3 100644 --- a/.github/workflows/script/re-pull.sh +++ b/.github/workflows/script/re-pull.sh @@ -48,9 +48,11 @@ HTTP_STATUS=$(curl -s -o /tmp/portainer_response.json -w "%{http_code}" \ -H "Content-Type: application/json" \ -d "$PAYLOAD") -if [ "$HTTP_STATUS" != "200" ]; then +if [ "$HTTP_STATUS" = "524" ] || [ "$HTTP_STATUS" = "504" ] || [ "$HTTP_STATUS" = "408" ]; then + echo "⚠️ HTTP $HTTP_STATUS (gateway timeout) — Portainer tetap memproses redeploy, lanjut polling container..." +elif [ "$HTTP_STATUS" != "200" ]; then echo "❌ Redeploy gagal! HTTP Status: $HTTP_STATUS" - cat /tmp/portainer_response.json | jq . + cat /tmp/portainer_response.json | jq . 2>/dev/null || true exit 1 fi