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 }}