55
66 pull_request :
77 types : [closed]
8+ branches :
9+ - dev
10+ - parent-image-updates
811
912permissions :
1013 id-token : write
@@ -14,59 +17,10 @@ permissions:
1417jobs :
1518 call-pi-merge-parent-image :
1619 uses : code-kern-ai/cicd-deployment-scripts/.github/workflows/pi_merge_submodule.yml@dev
17- if : ${{ github.event.pull_request.merged }}
20+ if : ${{ github.event.pull_request.merged && github.event.pull_request.head.ref == 'parent-image-updates' }}
1821 secrets : inherit
19-
20- pi-matrix :
21- uses : code-kern-ai/cicd-deployment-scripts/.github/workflows/pi_matrix .yml@dev
22+
23+ call- pi-cleanup-submodule :
24+ uses : code-kern-ai/cicd-deployment-scripts/.github/workflows/pi_cleanup_submodule .yml@dev
2225 if : ${{ !github.event.pull_request.merged && github.event.pull_request.head.ref == 'parent-image-updates' }}
2326 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}}
39-
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 }}
0 commit comments