Skip to content

Commit

Permalink
Update README only if there are any changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sunilbpandey committed Dec 27, 2023
1 parent 4430f85 commit bb275e2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
permissions:
contents: write
jobs:
publish:
update_readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand All @@ -15,8 +15,10 @@ jobs:
run: python3 scripts/update_readme.py
- name: Push changes
run: |
git config user.name "Sunil Pandey"
git config user.email "64631561+sunilbpandey@users.noreply.github.com"
git add README.md
git commit -m "Update README.md"
git push
if ! git diff --cached --quiet; then
git config user.name "Sunil Pandey"
git config user.email "64631561+sunilbpandey@users.noreply.github.com"
git commit -m "Update README.md"
git push
fi

0 comments on commit bb275e2

Please sign in to comment.