File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 echo "configured=true" >> "$GITHUB_OUTPUT"
2626 echo "base_url=$BASE_URL" >> "$GITHUB_OUTPUT"
2727
28- - name : Check main app endpoint
29- if : ${{ steps.target.outputs.configured == 'true' }}
30- run : |
31- BASE_URL="${{ steps.target.outputs.base_url }}"
32- echo "Checking main endpoint: $BASE_URL/"
33-
34- curl -sS -L --retry 3 --retry-delay 1 --retry-max-time 15 \
35- --connect-timeout 5 --max-time 15 -w "\n%{http_code}" -o /tmp/response.txt "$BASE_URL/" > /tmp/curl_output.txt 2>&1
36- HTTP_CODE=$(tail -n 1 /tmp/curl_output.txt | tr -d '[:space:]')
37-
38- echo "HTTP Status: $HTTP_CODE"
39-
40- if [ "$HTTP_CODE" != "200" ] && [ "$HTTP_CODE" != "301" ] && [ "$HTTP_CODE" != "302" ] && [ "$HTTP_CODE" != "307" ] && [ "$HTTP_CODE" != "308" ]; then
41- echo "::error::Main endpoint returned $HTTP_CODE (expected 2xx-3xx or redirect)"
42- echo "Response preview:"
43- head -c 500 /tmp/response.txt || true
44- exit 1
45- fi
46- echo "[OK] Main endpoint healthy ($HTTP_CODE)"
47-
4828 - name : Check health endpoint
4929 if : ${{ steps.target.outputs.configured == 'true' }}
5030 run : |
You can’t perform that action at this time.
0 commit comments