Skip to content

Commit 6e01ca9

Browse files
Refactor commit logic in update-readme.yml
1 parent 5346191 commit 6e01ca9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/update-readme.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@ jobs:
2424
run: |
2525
git config user.name "github-actions[bot]"
2626
git config user.email "github-actions[bot]@users.noreply.github.com"
27-
git add README.md
28-
git diff --quiet && git diff --staged --quiet || (git commit -m "docs: update README with config file contents" && git push)
27+
if ! git diff --quiet HEAD; then
28+
git add README.md
29+
git commit -m "docs: update README with config file contents"
30+
git push
31+
fi

0 commit comments

Comments
 (0)