Update .gitea/workflows/ci.yml
All checks were successful
Update Community Skins README / Full CI/CD Pipeline (push) Successful in 6s

This commit is contained in:
Arlind
2025-06-20 16:27:11 +02:00
parent f6c5ed9f4c
commit 2f3a31e815

View File

@@ -113,81 +113,81 @@ jobs:
echo "avatar_rows_file=$avatar_rows_file" >> "$GITHUB_OUTPUT" echo "avatar_rows_file=$avatar_rows_file" >> "$GITHUB_OUTPUT"
echo "total_valid_entries=$total_valid_entries" >> "$GITHUB_OUTPUT" echo "total_valid_entries=$total_valid_entries" >> "$GITHUB_OUTPUT"
- name: Update README with user skins - name: Update README with user skins
id: update_readme id: update_readme
shell: bash shell: bash
run: | run: |
set -eo pipefail set -eo pipefail
user_rows_file="${{ steps.find_skins.outputs.user_rows_file }}" user_rows_file="${{ steps.find_skins.outputs.user_rows_file }}"
avatar_rows_file="${{ steps.find_skins.outputs.avatar_rows_file }}" avatar_rows_file="${{ steps.find_skins.outputs.avatar_rows_file }}"
total_valid_entries="${{ steps.find_skins.outputs.total_valid_entries }}" total_valid_entries="${{ steps.find_skins.outputs.total_valid_entries }}"
README_PATH="README.md" README_PATH="README.md"
if [ "$total_valid_entries" -eq 0 ]; then if [ "$total_valid_entries" -eq 0 ]; then
echo "No valid entries found skipping README update" echo "No valid entries found skipping README update"
exit 0 exit 0
fi fi
# Backup the old README # Backup the old README
cp "$README_PATH" "${README_PATH}.bak" cp "$README_PATH" "${README_PATH}.bak"
# Write the new README # Write the new README
cat > "$README_PATH" <<-EOF cat > "$README_PATH" <<-EOF
# osu! Swiss Community Skin collection # osu! Swiss Community Skin collection
Welcome to the osu! Swiss Community Skin collection, this repository archives and showcases Skins osc members use. Welcome to the osu! Swiss Community Skin collection, this repository archives and showcases Skins osc members use.
Enjoy looking around, click file names to download the skins and click on the images to see more about the skins. Enjoy looking around, click file names to download the skins and click on the images to see more about the skins.
## How do I add my skins here? ## How do I add my skins here?
If you're interested in adding your skins here please follow this tutorial [how-to-use](/how-to-use.md) If you're interested in adding your skins here please follow this tutorial [how-to-use](/how-to-use.md)
## Skins ## Skins
<details> <details>
<summary>list instead of icons</summary> <summary>list instead of icons</summary>
<br /> <br />
<table border="1" cellpadding="5" cellspacing="0"> <table border="1" cellpadding="5" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Global Rank</th> <th>Global Rank</th>
<th>Country Rank</th> <th>Country Rank</th>
<th>Profile</th> <th>Profile</th>
<th>Skins</th> <th>Skins</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
EOF EOF
sort -t '|' -k1,1n "$user_rows_file" | cut -d'|' -f2- | sed 's/^/ /' >> "$README_PATH" sort -t '|' -k1,1n "$user_rows_file" | cut -d'|' -f2- | sed 's/^/ /' >> "$README_PATH"
cat >> "$README_PATH" <<-EOF cat >> "$README_PATH" <<-EOF
</tbody> </tbody>
</table> </table>
</details> </details>
<p align="center"> <p align="center">
EOF EOF
sort -t '|' -k1,1n "$avatar_rows_file" | cut -d'|' -f2- | sed 's/^/ /' >> "$README_PATH" sort -t '|' -k1,1n "$avatar_rows_file" | cut -d'|' -f2- | sed 's/^/ /' >> "$README_PATH"
cat >> "$README_PATH" <<-EOF cat >> "$README_PATH" <<-EOF
</p> </p>
EOF EOF
# Clean up temp files # Clean up temp files
rm -f "$user_rows_file" "$avatar_rows_file" rm -f "$user_rows_file" "$avatar_rows_file"
# Check for differences to avoid unnecessary commit # Check for differences to avoid unnecessary commit
if cmp -s "$README_PATH" "${README_PATH}.bak"; then if cmp -s "$README_PATH" "${README_PATH}.bak"; then
echo "README has not changed, skipping commit" echo "README has not changed, skipping commit"
exit 0 exit 0
else else
echo "README updated" echo "README updated"
fi fi
- name: Configure Git - name: Configure Git
run: | run: |