generated from osc/skins-template
Update .gitea/workflows/test-skins.yml
This commit is contained in:
@@ -28,14 +28,18 @@ jobs:
|
||||
|
||||
check_http() {
|
||||
local url="$1"
|
||||
echo " → Checking external: $url"
|
||||
|
||||
# HEAD first
|
||||
if curl -Is --max-time 10 "$url" | head -n 1 | grep -qE "HTTP/.* (200|30[0-9])"; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# GET fallback
|
||||
if curl -Is --max-time 10 -X GET "$url" | head -n 1 | grep -qE "HTTP/.* (200|30[0-9])"; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -45,6 +49,8 @@ jobs:
|
||||
local decoded
|
||||
decoded=$(urldecode "$path")
|
||||
|
||||
echo " → Checking local: $decoded"
|
||||
|
||||
if [[ ! -e "$decoded" ]]; then
|
||||
return 1
|
||||
fi
|
||||
@@ -99,12 +105,16 @@ jobs:
|
||||
echo
|
||||
done < <(find . -type f -name '*.md')
|
||||
|
||||
echo
|
||||
if (( ${#ERRORS[@]} > 0 )); then
|
||||
echo -e "${RED}✖ Errors found:${RESET}"
|
||||
echo -e "${RED}✖ Broken Links & Missing Files Found:${RESET}"
|
||||
for e in "${ERRORS[@]}"; do
|
||||
echo "$e"
|
||||
done
|
||||
exit 1
|
||||
echo
|
||||
echo -e "${RED}⚠️ Job will NOT fail (requested behavior).${RESET}"
|
||||
else
|
||||
echo -e "${GREEN}✔ All links OK!${RESET}"
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}✔ All links OK!${RESET}"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user