Skip to content

Commit e995407

Browse files
committed
perf: add cleanup workflow
1 parent 4aee748 commit e995407

File tree

1 file changed

+4
-53
lines changed

1 file changed

+4
-53
lines changed

.github/workflows/pi_merge.yml

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -16,57 +16,8 @@ jobs:
1616
uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/pi_merge_submodule.yml@dev
1717
if: ${{ github.event.pull_request.merged }}
1818
secrets: inherit
19-
20-
pi-matrix:
21-
uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/pi_matrix.yml@dev
22-
if: ${{ !github.event.pull_request.merged && github.event.pull_request.head.ref == 'parent-image-updates' }}
23-
secrets: inherit
24-
with:
25-
checkout_ref: parent-image-updates
26-
repository: "${{ github.repository_owner }}/refinery-submodule-parent-images"
27-
28-
call-dc-registry-delete:
29-
name: 'Docker: Delete Branch Images'
30-
needs: [pi-matrix]
31-
uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/dc_registry_delete.yml@dev
32-
secrets: inherit
33-
strategy:
34-
matrix:
35-
parent_image_type: ${{ fromJson(needs.pi-matrix.outputs.parent_image_type) }}
36-
with:
37-
delete_tag: ${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}
38-
app_name: ${{ vars.PARENT_IMAGE_NAME}}
3919

40-
gh-delete-submodule-branches:
41-
name: 'GitHub: Delete Submodule Branch'
42-
needs: [call-dc-registry-delete]
43-
if: ${{ !failure() }}
44-
runs-on: ubuntu-latest
45-
steps:
46-
- name: Checkout repository
47-
uses: actions/checkout@v4
48-
with:
49-
token: ${{ secrets.GH_TOKEN }}
50-
51-
- name: Delete Branch
52-
shell: bash
53-
run: git push origin --delete ${{ github.event.pull_request.head.ref }}
54-
55-
gh-delete-app-branches:
56-
name: 'GitHub: Delete App Branch'
57-
needs: [pi-matrix, gh-delete-submodule-branches]
58-
if: ${{ !failure() }}
59-
runs-on: ubuntu-latest
60-
strategy:
61-
matrix:
62-
app: ${{ fromJson(needs.pi-matrix.outputs.app) }}
63-
steps:
64-
- name: Checkout repository
65-
uses: actions/checkout@v4
66-
with:
67-
repository: "${{ github.repository_owner }}/${{ matrix.app }}"
68-
token: ${{ secrets.GH_TOKEN }}
69-
70-
- name: Delete Branch
71-
shell: bash
72-
run: git push origin --delete ${{ github.event.pull_request.head.ref }}
20+
call-pi-cleanup-submodule:
21+
uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/pi_cleanup_submodule.yml@dev
22+
if: ${{ !github.event.pull_request.merged }}
23+
secrets: inherit

0 commit comments

Comments
 (0)