Skip to content

Commit 2f99f3a

Browse files
committed
Only commit version updates if they changed.
1 parent 5090d54 commit 2f99f3a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/sync.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,17 @@ jobs:
2121
node-version: "12"
2222

2323
- name: Update tooling versions
24-
run: |
25-
node ./dist/update.js
26-
27-
- name: Commit files
2824
run: |
2925
git config --local pull.ff only
3026
git config --local user.email "[email protected]"
3127
git config --local user.name "GitHub Action"
28+
3229
git pull
33-
git commit -m "Sync repository with latest tooling" -a
30+
node ./dist/update.js
31+
git diff --quiet || git commit -a -m "Sync repository with latest tooling."
3432
3533
- name: Push changes
3634
uses: ad-m/github-push-action@master
3735
with:
36+
branch: ${{ github.ref }}
3837
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)