Skip to content

Commit d2ac6a6

Browse files
committed
fix(ci): prevent commit if there are no changes
1 parent ed31d4f commit d2ac6a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/format-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
git config --global user.name 'github-actions[bot]'
3636
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
3737
git add .
38-
git commit -m "ci: format code"
38+
git diff-index --quiet HEAD || git commit -m "ci: format code"
3939
4040
- name: Push changes
4141
uses: ad-m/[email protected]

0 commit comments

Comments
 (0)