Merge pull request #1112 from dwisiswant0/fix/nothing-to-commit

Add changes condition before commit & push on auto update README
patch-1
PD-Team 2021-03-20 15:27:44 +05:30 committed by GitHub
commit ea0f3a2f48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -28,16 +28,20 @@ jobs:
python-version: "3.8"
- name: Update README
id: update-readme
run: |
python .github/scripts/update-readme.py
echo "::set-output name=changes::$(git status -s | wc -l)"
- name: Commit files
if: steps.update-readme.outputs.changes > 0
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Auto Update README [$(date)] :robot:" -a
- name: Push changes
if: steps.update-readme.outputs.changes > 0
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}