generated from osc/skins-template
Update .gitea/workflows/test-skins.yml
This commit is contained in:
@@ -77,10 +77,17 @@ jobs:
|
|||||||
|
|
||||||
# Check if it's an external URL
|
# Check if it's an external URL
|
||||||
if [[ "$decoded_link" =~ ^https?:// ]]; then
|
if [[ "$decoded_link" =~ ^https?:// ]]; then
|
||||||
|
# Replace git.sulej.net with internal gitea URL for checking
|
||||||
|
check_url="$link"
|
||||||
|
if [[ "$link" =~ git\.sulej\.net ]]; then
|
||||||
|
check_url="${link//git.sulej.net/gitea:3000}"
|
||||||
|
check_url="${check_url//https:/http:}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Check external URL with curl
|
# Check external URL with curl
|
||||||
http_code=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 \
|
http_code=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 \
|
||||||
-H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" \
|
-H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" \
|
||||||
"$link" 2>/dev/null || echo "000")
|
"$check_url" 2>/dev/null || echo "000")
|
||||||
|
|
||||||
# Accept 2xx and 3xx status codes as valid
|
# Accept 2xx and 3xx status codes as valid
|
||||||
if ! [[ "$http_code" =~ ^[23][0-9][0-9]$ ]]; then
|
if ! [[ "$http_code" =~ ^[23][0-9][0-9]$ ]]; then
|
||||||
@@ -155,13 +162,13 @@ jobs:
|
|||||||
echo "skin: $skin_name"
|
echo "skin: $skin_name"
|
||||||
|
|
||||||
# Download link
|
# Download link
|
||||||
grep "/export/$skin_name/.*\.osk" /tmp/download_$$.txt 2>/dev/null || true
|
grep "/export/$skin_name/.*\.osk" /tmp/download_$$.txt 2>/dev/null | sort -u || true
|
||||||
|
|
||||||
# Thumbnail
|
# Thumbnail
|
||||||
grep "thumbnail/$skin_name/" /tmp/media_$$.txt 2>/dev/null || true
|
grep "thumbnail/$skin_name/" /tmp/media_$$.txt 2>/dev/null | sort -u || true
|
||||||
|
|
||||||
# Docs
|
# Docs
|
||||||
grep "/docs/$skin_name/" /tmp/tags_$$.txt 2>/dev/null || true
|
grep "/docs/$skin_name/" /tmp/tags_$$.txt 2>/dev/null | sort -u || true
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
done < /tmp/skins_$$.txt
|
done < /tmp/skins_$$.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user