Skip to content

Commit a0360ff

Browse files
committed
에러 코드 처리
1 parent f144597 commit a0360ff

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/healthcheck.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,16 @@ jobs:
2323
FAIL_LIST=""
2424
for url in $(yq '.urls[]' .github/urls.yaml); do
2525
echo "Checking $url"
26-
code=$(curl -s -o /dev/null -w "%{http_code}" "$url") || code="000"
26+
27+
set +e
28+
code=$(curl -s -o /dev/null -w "%{http_code}" "$url")
29+
ret=$?
30+
set -e
31+
32+
if [ "$ret" -ne 0 ]; then
33+
code="000"
2734
fi
35+
2836
if [ "$code" -ne 200 ]; then
2937
echo "$url is DOWN (status $code)"
3038
FAIL_LIST+="$url (status code $code)\n"

0 commit comments

Comments
 (0)