Skip to content

Commit

Permalink
Do not commit if nothing to commit
Browse files Browse the repository at this point in the history
  • Loading branch information
noraworld committed Mar 12, 2022
1 parent 98625b3 commit b1f4cf0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ runs:
- name: Update mapping file
# https://github.com/actions/checkout/tree/2d1c1198e79c30cca5c3957b1e3b65ce95b5356e#push-a-commit-using-the-built-in-token
run: |
git config user.name github-actions
git config user.email [email protected]
git commit -am "Update mapping file"
git push
if [ -n "$(git status --porcelain)" ]; then
git config user.name github-actions
git config user.email [email protected]
git commit -am "Update mapping file"
git push
fi
shell: sh

0 comments on commit b1f4cf0

Please sign in to comment.