From dd026fdcf6e389030c84617c5aa7f8c14e0a41f6 Mon Sep 17 00:00:00 2001 From: imsyy Date: Thu, 13 Jun 2024 09:56:07 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20chore:=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/check-dependency-updates.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-dependency-updates.yml b/.github/workflows/check-dependency-updates.yml index 153e4de..3170657 100644 --- a/.github/workflows/check-dependency-updates.yml +++ b/.github/workflows/check-dependency-updates.yml @@ -29,13 +29,17 @@ jobs: ncu -u npm install - - name: Commit changes + - name: Check for changes run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email 'github-actions[bot]@users.noreply.github.com' - git add . - git commit -m 'chore: update dependencies' - git pull --rebase origin master - git push + if [ -n "$(git status --porcelain)" ]; then + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add . + git commit -m 'chore: update dependencies' + git pull --rebase origin master + git push + else + echo "No changes to commit" + fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}