Skip to content

Commit ba7f4e4

Browse files
committed
perf: cleanup app branches on pi_merge_submodule
1 parent 1c96028 commit ba7f4e4

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/pi_merge_submodule.yml

+21-3
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ jobs:
8181
--head ${{ needs.configure-branch-name.outputs.gh_head_ref }} \
8282
--repo ${{ github.repository_owner }}/refinery-${{ matrix.parent_image_type }}-parent-image || true
8383
84-
8584
gh-delete-submodule-branches:
86-
name: 'GitHub: Delete Branch'
85+
name: 'GitHub: Delete Submodule Branch'
8786
needs: [pi-matrix, pi-update-submodule]
8887
if: ${{ !failure() }}
8988
runs-on: ubuntu-latest
@@ -98,4 +97,23 @@ jobs:
9897

9998
- name: Delete Branch
10099
shell: bash
101-
run: git push origin --delete ${{ github.event.pull_request.head.ref }}
100+
run: git push origin --delete ${{ github.event.pull_request.head.ref }}
101+
102+
gh-delete-app-branches:
103+
name: 'GitHub: Delete App Branch'
104+
needs: [configure-branch-name, pi-matrix, gh-delete-submodule-branches]
105+
if: ${{ !failure() }}
106+
runs-on: ubuntu-latest
107+
strategy:
108+
matrix:
109+
include: ${{ fromJson(needs.pi-matrix.outputs.include) }}
110+
steps:
111+
- name: Checkout repository
112+
uses: actions/checkout@v4
113+
with:
114+
token: ${{ secrets.GH_TOKEN }}
115+
repository: ${{ github.repository_owner }}/${{ matrix.app }}
116+
117+
- name: Delete Branch
118+
shell: bash
119+
run: git push origin --delete ${{ needs.configure-branch-name.outputs.gh_head_ref }} || true

0 commit comments

Comments
 (0)