Skip to content

Commit 2d8e383

Browse files
Only push README.md changes if there are changes
1 parent 2ec0080 commit 2d8e383

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ jobs:
3636
- name: Generate README
3737
run: |
3838
yarn gen-readme
39-
git config --global user.name github-actions[bot]
40-
git config --global user.email github-actions[bot]@users.noreply.github.com
41-
git add README.md
42-
git commit -m "Update README.md"
43-
git push
39+
if [[ `git status --porcelain` ]]; then
40+
git config --global user.name github-actions[bot]
41+
git config --global user.email github-actions[bot]@users.noreply.github.com
42+
git add README.md
43+
git commit -m "Update README.md"
44+
git push
45+
fi
4446
4547
- name: "`yarn gen-readme` changes committed?"
4648
run: |

0 commit comments

Comments
 (0)