Skip to content

Commit 99d6609

Browse files
committed
Prevent workflow from failing when there's nothing to commit
1 parent d83a90f commit 99d6609

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/language-reference.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ jobs:
6666
git config user.name gh-actions
6767
git config user.email actions@github.com
6868
git add .
69-
git commit -m "UPDATE ${{ steps.date.outputs.date }}"
70-
git push
69+
if ! git diff-index --quiet HEAD; then
70+
git commit -m "UPDATE ${{ steps.date.outputs.date }}"
71+
git push
72+
fi
7173
cd ..
7274
7375
- name: Merge changes to main
@@ -79,7 +81,7 @@ jobs:
7981
git merge language-reference-stable
8082
cd ..
8183
82-
- name: Create pull reuqest with backport to main
84+
- name: Create pull request with backport to main
8385
if: github.event_name == 'push'
8486
uses: peter-evans/create-pull-request@v4
8587
with:

0 commit comments

Comments
 (0)