generated from osc/skins-template
Update .gitea/workflows/test-skins.yml
This commit is contained in:
@@ -60,10 +60,10 @@ jobs:
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Categorize and check links
|
# Categorize and check links
|
||||||
declare -A download_links
|
> /tmp/download_$$.txt
|
||||||
declare -A media_links
|
> /tmp/media_$$.txt
|
||||||
declare -A tag_links
|
> /tmp/video_$$.txt
|
||||||
declare -A video_links
|
> /tmp/tags_$$.txt
|
||||||
|
|
||||||
# Check each link
|
# Check each link
|
||||||
while IFS= read -r link; do
|
while IFS= read -r link; do
|
||||||
@@ -91,15 +91,15 @@ jobs:
|
|||||||
|
|
||||||
# Categorize external URLs
|
# Categorize external URLs
|
||||||
if [[ "$decoded_link" =~ /export/.*\.(osk|osz)$ ]]; then
|
if [[ "$decoded_link" =~ /export/.*\.(osk|osz)$ ]]; then
|
||||||
download_links["$decoded_link"]="$status"
|
echo " $status $decoded_link" >> /tmp/download_$$.txt
|
||||||
elif [[ "$decoded_link" =~ /media/gameplay/.*\.(mp4|webm)$ ]]; then
|
elif [[ "$decoded_link" =~ /media/gameplay/.*\.(mp4|webm)$ ]]; then
|
||||||
video_links["$decoded_link"]="$status"
|
echo " $status $decoded_link" >> /tmp/video_$$.txt
|
||||||
elif [[ "$decoded_link" =~ /src/tag/ ]]; then
|
elif [[ "$decoded_link" =~ /src/tag/ ]]; then
|
||||||
tag_links["$decoded_link"]="$status"
|
echo " $status $decoded_link" >> /tmp/tags_$$.txt
|
||||||
elif [[ "$decoded_link" =~ /media/(panel|icons|thumbnail)/ ]]; then
|
elif [[ "$decoded_link" =~ /media/(panel|icons|thumbnail)/ ]]; then
|
||||||
media_links["$decoded_link"]="$status"
|
echo " $status $decoded_link" >> /tmp/media_$$.txt
|
||||||
else
|
else
|
||||||
download_links["$decoded_link"]="$status"
|
echo " $status $decoded_link" >> /tmp/download_$$.txt
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Local file - remove leading slash if present
|
# Local file - remove leading slash if present
|
||||||
@@ -119,48 +119,42 @@ jobs:
|
|||||||
|
|
||||||
# Categorize local files
|
# Categorize local files
|
||||||
if [[ "$decoded_link" =~ \.(webp|png|jpg|jpeg)$ ]]; then
|
if [[ "$decoded_link" =~ \.(webp|png|jpg|jpeg)$ ]]; then
|
||||||
media_links["$decoded_link"]="$status"
|
echo " $status $decoded_link" >> /tmp/media_$$.txt
|
||||||
elif [[ "$decoded_link" =~ \.md$ ]]; then
|
elif [[ "$decoded_link" =~ \.md$ ]]; then
|
||||||
tag_links["$decoded_link"]="$status"
|
echo " $status $decoded_link" >> /tmp/tags_$$.txt
|
||||||
else
|
else
|
||||||
download_links["$decoded_link"]="$status"
|
echo " $status $decoded_link" >> /tmp/download_$$.txt
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < /tmp/links_$$.txt
|
done < /tmp/links_$$.txt
|
||||||
|
|
||||||
# Display categorized results
|
# Display categorized results
|
||||||
if [ ${#download_links[@]} -gt 0 ]; then
|
if [ -s /tmp/download_$$.txt ]; then
|
||||||
echo "download:"
|
echo "download:"
|
||||||
for link in "${!download_links[@]}"; do
|
cat /tmp/download_$$.txt
|
||||||
echo " ${download_links[$link]} $link"
|
|
||||||
done
|
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${#media_links[@]} -gt 0 ]; then
|
if [ -s /tmp/media_$$.txt ]; then
|
||||||
echo "media:"
|
echo "media:"
|
||||||
for link in "${!media_links[@]}"; do
|
cat /tmp/media_$$.txt
|
||||||
echo " ${media_links[$link]} $link"
|
|
||||||
done
|
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${#video_links[@]} -gt 0 ]; then
|
if [ -s /tmp/video_$$.txt ]; then
|
||||||
echo "video:"
|
echo "video:"
|
||||||
for link in "${!video_links[@]}"; do
|
cat /tmp/video_$$.txt
|
||||||
echo " ${video_links[$link]} $link"
|
|
||||||
done
|
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${#tag_links[@]} -gt 0 ]; then
|
if [ -s /tmp/tags_$$.txt ]; then
|
||||||
echo "tags:"
|
echo "tags:"
|
||||||
for link in "${!tag_links[@]}"; do
|
cat /tmp/tags_$$.txt
|
||||||
echo " ${tag_links[$link]} $link"
|
|
||||||
done
|
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm -f /tmp/download_$$.txt /tmp/media_$$.txt /tmp/video_$$.txt /tmp/tags_$$.txt
|
||||||
|
|
||||||
rm -f /tmp/links_$$.txt
|
rm -f /tmp/links_$$.txt
|
||||||
|
|
||||||
if [ $file_has_errors -eq 0 ]; then
|
if [ $file_has_errors -eq 0 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user