Update .gitea/workflows/ci.yml
All checks were successful
Update Community Skins README / gather-skins (push) Successful in 10s
Update Community Skins README / generate-readme (push) Successful in 2s
Update Community Skins README / commit-readme (push) Successful in 2s

This commit is contained in:
Arlind
2025-07-17 08:24:05 +02:00
parent 5f121018e1
commit 32747d7083

View File

@@ -98,10 +98,28 @@ jobs:
user_data=$(curl --retry 3 --retry-delay 5 -s \
"https://osu.ppy.sh/api/get_user?k=${{ secrets.OSUAPIV1 }}&u=$osu_id&type=id&_ts=$(date +%s)")
[ "$(echo "$user_data" | jq 'length')" -eq 0 ] && {
echo " ❌ Skipped: No data from osu! API"
if [ "$(echo "$user_data" | jq 'length')" -eq 0 ]; then
echo " 🚫 Restricted or banned user"
username="$owner"
pp_rank="RESTRICTED"
pp_country_rank="RESTRICTED"
padded_rank="9999999"
gitea_avatar_url="https://git.sulejmani.xyz/avatar/$owner"
profile_url="https://git.sulejmani.xyz/$owner"
skins_url="$profile_url?tab=repositories"
printf "%s|<tr><td>%s</td><td>%s</td><td>%s</td><td><a href=\"%s\">Gitea</a></td><td><a href=\"%s\">Skins</a></td></tr>\n" \
"$padded_rank" "$username" "$pp_rank" "$pp_country_rank" "$profile_url" "$skins_url" >> "$USER_ROWS_FILE"
printf "%s|<a href=\"%s\"><img src=\"%s\" width=175 height=175></a>\n" \
"$padded_rank" "$skins_url" "$gitea_avatar_url" >> "$AVATAR_ROWS_FILE"
total_valid_entries=$((total_valid_entries + 1))
continue
}
fi
pp_rank=$(echo "$user_data" | jq -r '.[0].pp_rank // "9999999"')
pp_country_rank=$(echo "$user_data" | jq -r '.[0].pp_country_rank // "-"')