Skip to content

Commit

Permalink
handle no branches to delete
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Dec 24, 2024
1 parent aff9542 commit 6ed56d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/squash_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,9 @@ jobs:
- name: Delete branches
run: |
echo "Starting branch deletion process..."
git push origin --delete ${{ steps.collect-branches.outputs.branches }}
if [ -n "$(echo ${{ steps.collect-branches.outputs.branches }} | tr -d '[:space:]')" ]; then
echo "Starting branch deletion process..."
git push origin --delete ${{ steps.collect-branches.outputs.branches }}
else
echo "No branches to delete"
fi

0 comments on commit 6ed56d7

Please sign in to comment.