File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 55 paths :
66 - ' **/modrinth.index.json'
77
8+ permissions :
9+ contents : write
10+
811jobs :
912 sort-files :
1013 runs-on : ubuntu-latest
@@ -29,15 +32,14 @@ jobs:
2932 node sort-modrinth-files.js "$file"
3033 done
3134
32- - name : Commit changes
35+ - name : Commit and push changes
3336 run : |
3437 git config --local user.email "github-actions[bot]@users.noreply.github.com"
3538 git config --local user.name "github-actions[bot]"
3639 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 }}
40+ if ! git diff --staged --quiet; then
41+ git commit -m "chore: sort modrinth.index.json files alphabetically"
42+ git push
43+ else
44+ echo "No changes to commit"
45+ fi
You can’t perform that action at this time.
0 commit comments