Skip to content

Commit

Permalink
Workflow fails when there is nothing to commit. So, adding a conditio…
Browse files Browse the repository at this point in the history
…nal block.
  • Loading branch information
amitavroy committed Jan 8, 2025
1 parent cdb2d7e commit 53603e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ jobs:
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
if [[ -n $(git status -s) ]]; then
git diff --exit-code || (
git add .
git commit -m 'Update dependencies'
git push
else
echo "No changes to commit"
)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 53603e4

Please sign in to comment.