Skip to content

Commit 374086c

Browse files
feat(config): add new fun settings for animal variants and customization options
fix(servers): update servers.dat binary file feat(script): create sort-modrinth-files.js to sort files in modrinth.index.json
1 parent 1579e40 commit 374086c

File tree

7 files changed

+14443
-281
lines changed

7 files changed

+14443
-281
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Sort Modrinth Files
2+
3+
on:
4+
push:
5+
paths:
6+
- '**/modrinth.index.json'
7+
8+
jobs:
9+
sort-files:
10+
runs-on: ubuntu-latest
11+
if: github.actor != 'github-actions[bot]'
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
24+
- name: Sort modrinth.index.json files
25+
run: |
26+
# Find all modrinth.index.json files and sort them
27+
find . -name "modrinth.index.json" -type f | while read file; do
28+
echo "Sorting $file"
29+
node sort-modrinth-files.js "$file"
30+
done
31+
32+
- name: Commit changes
33+
run: |
34+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
35+
git config --local user.name "github-actions[bot]"
36+
git add "**/modrinth.index.json"
37+
git diff --staged --quiet || git commit -m "chore: sort modrinth.index.json files alphabetically"
38+
39+
- name: Push changes
40+
uses: ad-m/github-push-action@master
41+
with:
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
branch: ${{ github.ref }}

0 commit comments

Comments
 (0)