Merge pull request #1112 from dwisiswant0/fix/nothing-to-commit
Add changes condition before commit & push on auto update READMEpatch-1
commit
ea0f3a2f48
|
@ -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 }}
|
||||
|
|
Loading…
Reference in New Issue