Skip to content

Commit e219e66

Browse files
committed
ci: include HTTP status code in final results
1 parent 9d82e11 commit e219e66

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/broken-link-checker.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ jobs:
9595
return 0
9696
else
9797
echo " ❌ Failed: HTTP $http_code"
98+
failed_http_code="$http_code"
9899
return 1
99100
fi
100101
}
@@ -113,12 +114,12 @@ jobs:
113114
while IFS= read -r url; do
114115
[ -z "$url" ] && continue
115116
if ! verify_with_curl "$url"; then
116-
verified_failures="${verified_failures}${url}\n"
117+
verified_failures="${verified_failures}${url} (HTTP ${failed_http_code})\n"
117118
fi
118119
done <<< "$urls_to_verify"
119120
fi
120121
121-
# Final decision
122+
# Final results
122123
echo ""
123124
if [ -n "$verified_failures" ]; then
124125
echo "❌ CI Failed: The following links failed:"

0 commit comments

Comments
 (0)