Skip to content

chore: update version for SkyHanni and Zoomify #4

chore: update version for SkyHanni and Zoomify

chore: update version for SkyHanni and Zoomify #4

name: Sort Modrinth Files
on:
push:
paths:
- '**/modrinth.index.json'
permissions:
contents: write
jobs:
sort-files:
runs-on: ubuntu-latest
if: github.actor != 'github-actions[bot]'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Sort modrinth.index.json files
run: |
# Find all modrinth.index.json files and sort them
find . -name "modrinth.index.json" -type f | while read file; do
echo "Sorting $file"
node sort-modrinth-files.js "$file"
done
- name: Commit and push changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add "**/modrinth.index.json"
if ! git diff --staged --quiet; then
git commit -m "chore: sort modrinth.index.json files alphabetically"
git push
else
echo "No changes to commit"
fi