From f6ec7402311aa8eb2589138ab71cd721ae791207 Mon Sep 17 00:00:00 2001 From: yzqzss Date: Mon, 8 Jul 2024 05:14:41 +0800 Subject: [PATCH] CI: skip nothing to commit --- .github/workflows/updateInfo.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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