From f05f308f53307be72ffbbd1526a9cb5de2bcbbdc Mon Sep 17 00:00:00 2001 From: Rodrigo Borba Date: Sun, 25 Jan 2026 14:32:42 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20Substitui=20a=20valida=C3=A7=C3=A3o=20J?= =?UTF-8?q?SON=20com=20`jq`=20por=20`grep`=20no=20workflow=20de=20deploy?= =?UTF-8?q?=20e=20aprimora=20a=20mensagem=20de=20tentativa=20de=20reexecu?= =?UTF-8?q?=C3=A7=C3=A3o.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_check.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy_check.yml b/.github/workflows/deploy_check.yml index b1b16e7..670a8d7 100755 --- a/.github/workflows/deploy_check.yml +++ b/.github/workflows/deploy_check.yml @@ -29,19 +29,20 @@ jobs: status_code=$(echo $response | head -n 1) if [ $status_code -eq 200 ]; then body=$(curl -s https://chatwoot-pr-${{ github.event.pull_request.number }}.herokuapp.com/api) - if echo "$body" | jq -e '.version and .timestamp and .queue_services == "ok" and .data_services == "ok"' > /dev/null; then + # Check for required fields using grep to avoid jq dependency on self-hosted runners + if echo "$body" | grep -q '"version"' && echo "$body" | grep -q '"timestamp"' && echo "$body" | grep -q '"queue_services":"ok"' && echo "$body" | grep -q '"data_services":"ok"'; then echo "Deployment successful" exit 0 else - echo "Deployment status healthy but services not ready, retrying in 30 seconds..." + echo "Deployment status healthy but services not ready, retrying in 30 seconds... (Attempt $attempt/$max_attempts)" sleep 30 + attempt=$((attempt + 1)) fi else echo "Waiting for review app to be ready, retrying in 30 seconds... (Attempt $attempt/$max_attempts)" sleep 30 - attempt=$((attempt + 1)) + attempt=$((attempt + 1)) fi done echo "Deployment check timed out after $max_attempts attempts" - exit 1 - fi + exit 1