Skip to content

Commit e13ee0b

Browse files
committed
Seperate steps to resolve nothing to commit
1 parent c5f836f commit e13ee0b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/update-README.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ jobs:
2828
run: npm install
2929
- name: build README.md
3030
run: npm run build
31+
- name: get diff
32+
id: get_diff
33+
run: |
34+
git diff --quiet ./README.md || echo "::set-output name=new_changes_exist::true"
3135
- name: update README.md
36+
if: steps.get_diff.outputs.new_changes_exist == 'true'
3237
run: |
33-
git add .
38+
git add ./README.md
3439
git config user.name github-actions
3540
git config user.email [email protected]
3641
git commit -m "Automatic Update README.md"

0 commit comments

Comments
 (0)