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