diff --git a/.github/workflows/updateInfo.yml b/.github/workflows/updateInfo.yml index e5e84b36a44..106255cd54e 100644 --- a/.github/workflows/updateInfo.yml +++ b/.github/workflows/updateInfo.yml @@ -38,12 +38,15 @@ jobs: run: | python opml_generator.py - name: Commit files + id: commit run: | + echo "::set-output name=new::$(git status --porcelain)" git config --local user.email "actions@github.com" git config --local user.name "GitHub Action" git add . - git commit -m "update README and feed.opml after adding blog(s)" + git commit -m "update README and feed.opml after adding blog(s)" || echo "nothing to commit" - name: Push changes + if: steps.commit.new != '' uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file