Skip to content

Commit

Permalink
Updates action to have a more graceful failure in case of nothing to …
Browse files Browse the repository at this point in the history
…commit
  • Loading branch information
1Solon committed Sep 30, 2024
1 parent 240c03b commit 8b91329
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/update-flux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ jobs:
run: |
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add .
git commit -m "Update flux"
git checkout -b gh-actions/flux-update
git push --set-upstream origin gh-actions/flux-update
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Update flux"
git checkout -b gh-actions/flux-update
git push --set-upstream origin gh-actions/flux-update
else
echo "No changes to commit."
- name: Create Pull Request
run: gh pr create -B master -H gh-actions/flux-update --title 'Update Flux' --body 'Updates flux components using Flux CLI'
Expand Down

0 comments on commit 8b91329

Please sign in to comment.