We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99728c5 commit 2003063Copy full SHA for 2003063
actions/cleanup-branches/action.yml
@@ -73,11 +73,19 @@ runs:
73
done
74
- name: Delete branches (dry run)
75
shell: bash
76
- if: ${{ inputs.dry-run == 'true' }}
+ if: ${{ inputs.dry-run != 'false' }}
77
run: |
78
+ if [[ ! -s branches.txt ]]; then
79
+ echo "🟢 No branches marked for deletion."
80
+ exit 0
81
+ fi
82
cat branches.txt | xargs -I {} echo git push origin --delete "{}"
83
- name: Delete branches
84
- if: ${{ inputs.dry-run != 'true' }}
85
+ if: ${{ inputs.dry-run == 'false' }}
86
87
88
89
90
91
cat branches.txt | xargs -I {} git push origin --delete "{}"
0 commit comments