Clean up CI
This commit is contained in:
@@ -80,7 +80,6 @@ jobs:
|
|||||||
|
|
||||||
echo " → Repo: $owner/$repo"
|
echo " → Repo: $owner/$repo"
|
||||||
|
|
||||||
# Check for Skins directory
|
|
||||||
dir_code=$(curl --retry 3 --retry-delay 5 -s -w "%{http_code}" -o temp_dir.json \
|
dir_code=$(curl --retry 3 --retry-delay 5 -s -w "%{http_code}" -o temp_dir.json \
|
||||||
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
||||||
"$GITEA_API/repos/$owner/$repo/contents/Skins?_ts=$(date +%s)")
|
"$GITEA_API/repos/$owner/$repo/contents/Skins?_ts=$(date +%s)")
|
||||||
@@ -90,7 +89,6 @@ jobs:
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for README to extract osuid
|
|
||||||
readme_code=$(curl --retry 3 --retry-delay 5 -s -w "%{http_code}" -o temp_readme.json \
|
readme_code=$(curl --retry 3 --retry-delay 5 -s -w "%{http_code}" -o temp_readme.json \
|
||||||
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
||||||
"$GITEA_API/repos/$owner/$repo/contents/README.md?_ts=$(date +%s)")
|
"$GITEA_API/repos/$owner/$repo/contents/README.md?_ts=$(date +%s)")
|
||||||
@@ -156,14 +154,12 @@ jobs:
|
|||||||
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
|
|
||||||
cp "$README_PATH" "${README_PATH}.bak"
|
cp "$README_PATH" "${README_PATH}.bak"
|
||||||
|
|
||||||
# Write the new README
|
|
||||||
cat > "$README_PATH" <<-EOF
|
cat > "$README_PATH" <<-EOF
|
||||||
# osu! Swiss Community Skin collection
|
# osu! Swiss Community Skin collection
|
||||||
|
|
||||||
@@ -209,10 +205,8 @@ jobs:
|
|||||||
</p>
|
</p>
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# 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
|
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user