feat: add /api/version endpoint with IMAGE_TAG; validate in ci healthcheck
Some checks are pending
CI/CD → Deploy via SSH / Build & Push Docker Images (push) Waiting to run
CI/CD → Deploy via SSH / Deploy via SSH (push) Blocked by required conditions
CI/CD → Deploy via SSH / Validate HTTPS & Endpoints (push) Blocked by required conditions

This commit is contained in:
MatheusAlves96 2026-04-21 00:23:25 -03:00
parent b0eb12c17d
commit 849789d376
4 changed files with 23 additions and 0 deletions

View file

@ -188,6 +188,13 @@ jobs:
echo "Properties API: $STATUS"
[ "$STATUS" = "200" ] || (echo "❌ Properties API falhou ($STATUS)" && exit 1)
- name: Check deployed version matches image tag
run: |
RESPONSE=$(curl -s --max-time 10 "https://${{ vars.DOMAIN }}/api/version")
echo "Version response: $RESPONSE"
echo "$RESPONSE" | grep -q "${{ needs.build.outputs.image_tag }}" \
|| (echo "❌ Version tag não confere — esperado: ${{ needs.build.outputs.image_tag }}" && exit 1)
- name: All checks passed
run: |
echo "✅ Deploy validado com sucesso!"