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 9
9
10
10
build :
11
11
runs-on : ubuntu-latest
12
+ permissions :
13
+ contents : write
12
14
steps :
13
15
- uses : actions/checkout@v4
14
16
15
17
- name : Update Leaderboard in README.md
16
18
run : ./leaderboard-replace.sh
17
19
20
+ - name : Output README.md changes for debugging
21
+ run : git diff README.md
22
+
18
23
- name : Commit and Push changes
19
24
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
25
34
You can’t perform that action at this time.
0 commit comments