@@ -181,4 +181,42 @@ jobs:
181181 --body "${{ github.event.pull_request.body }}" \
182182 --base dev \
183183 --head ${{ needs.configure-branch-name.outputs.gh_head_ref }} \
184- --repo ${{ github.repository_owner }}/${{ matrix.app }} || true
184+ --repo ${{ github.repository_owner }}/${{ matrix.app }} || true
185+
186+ gh-delete-submodule-branches :
187+ name : ' GitHub: Delete Branch'
188+ needs : [pi-matrix, pi-update-submodule, pi-update-app]
189+ if : !failure()
190+ runs-on : ubuntu-latest
191+ strategy :
192+ matrix :
193+ parent_image_type : ${{ fromJson(needs.pi-matrix.outputs.parent_image_type) }}
194+ steps :
195+ - name : Checkout repository
196+ uses : actions/checkout@v4
197+ with :
198+ token : ${{ secrets.GH_TOKEN }}
199+ repository : ' ${{ github.repository_owner }}/refinery-${{ matrix.parent_image_type }}-parent-image'
200+
201+ - name : Delete Branch
202+ shell : bash
203+ run : git push origin --delete ${{ github.event.pull_request.head.ref }}
204+
205+ gh-delete-app-branches :
206+ name : ' GitHub: Delete Branch'
207+ needs : [pi-matrix, pi-update-submodule, pi-update-app]
208+ if : !failure()
209+ runs-on : ubuntu-latest
210+ strategy :
211+ matrix :
212+ include : ${{ fromJson(needs.pi-matrix.outputs.include) }}
213+ steps :
214+ - name : Checkout repository
215+ uses : actions/checkout@v4
216+ with :
217+ token : ${{ secrets.GH_TOKEN }}
218+ repository : ' ${{ github.repository_owner }}/${{ matrix.app }}'
219+
220+ - name : Delete Branch
221+ shell : bash
222+ run : git push origin --delete ${{ github.event.pull_request.head.ref }}
0 commit comments