Skip to content

Commit c01b7e5

Browse files
authored
Update files-changed.yml
1 parent 2d7230a commit c01b7e5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/files-changed.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,17 @@ jobs:
6262
run: python scripts/python_create_readme.py
6363

6464
- name: Commit and push changes
65+
shell: bash
6566
run: |
6667
ls -la
6768
git config --local user.name 'github-actions[bot]'
6869
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
69-
git add README.md
70-
git commit -m 'Auto update README.md'
71-
git push
70+
if ! git diff-index --quiet HEAD; then
71+
git add README.md
72+
git commit -m "Update README.md"
73+
git push
74+
else
75+
echo "No changes to commit"
76+
fi
7277
env:
7378
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)