File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 99
1010 build :
1111 runs-on : ubuntu-latest
12+ permissions :
13+ contents : write
1214 steps :
1315 - uses : actions/checkout@v4
1416
1517 - name : Update Leaderboard in README.md
1618 run : ./leaderboard-replace.sh
1719
20+ - name : Output README.md changes for debugging
21+ run : git diff README.md
22+
1823 - name : Commit and Push changes
1924 run : |
20- git config --global user.name "${GITHUB_ACTOR}"
21- git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
22- git commit -am "README.md: update leaderboard" \
23- && git push \
24- || true
25+ set -e
26+ if git diff --no-patch --exit-code README.md; then
27+ git config --global user.name "${GITHUB_ACTOR}"
28+ git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
29+ git commit -am "README.md: update leaderboard" \
30+ git push
31+ else
32+ echo "README.md unchanged, not committing"
33+ fi
2534
You can’t perform that action at this time.
0 commit comments