Skip to content

Commit 0d25ab2

Browse files
committed
feat: parent image improvements
1 parent ff241e3 commit 0d25ab2

File tree

9 files changed

+102
-306
lines changed

9 files changed

+102
-306
lines changed

.github/workflows/dc_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949

5050
- name: Delete Branch
5151
shell: bash
52-
run: git push origin --delete ${{ github.head_ref }}
52+
run: git push origin --delete ${{ github.head_ref }} || true

.github/workflows/gh_delete_branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ jobs:
7676

7777
- name: Delete Branch
7878
shell: bash
79-
run: git push origin --delete ${{ github.head_ref }}
79+
run: git push origin --delete ${{ github.head_ref }} || true

.github/workflows/k8s_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ jobs:
5858

5959
- name: Delete Branch
6060
shell: bash
61-
run: git push origin --delete ${{ github.head_ref }}
61+
run: git push origin --delete ${{ github.head_ref }} || true

.github/workflows/pi_build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,17 @@ jobs:
183183
-l "${{ env.HEAD_REF }}" \
184184
-r "${{ env.DOCKERHUB_CONTAINER_REGISTRY }}" \
185185
-e "${{ env.DEV_CONTAINER_REGISTRY }}" \
186-
-d "${{ env.DOCKERFILE }}"
186+
-d "${{ env.DOCKERFILE }}" \
187+
-t "build"
187188
188189
if [ -f "dev.${{ env.DOCKERFILE }}" ]; then
189190
bash ${{ github.workspace }}/cicd-deployment-scripts/pi/edit_dockerfile.sh \
190191
-i "${{ env.PARENT_IMAGE_NAME }}" \
191192
-l "${{ env.HEAD_REF }}" \
192193
-r "${{ env.DOCKERHUB_CONTAINER_REGISTRY }}" \
193194
-e "${{ env.DEV_CONTAINER_REGISTRY }}" \
194-
-d "dev.${{ env.DOCKERFILE }}"
195+
-d "dev.${{ env.DOCKERFILE }}" \
196+
-t "build"
195197
fi
196198
197199
if [ -f "gpu.${{ env.DOCKERFILE }}" ]; then
@@ -200,7 +202,8 @@ jobs:
200202
-l "${{ env.HEAD_REF }}" \
201203
-r "${{ env.DOCKERHUB_CONTAINER_REGISTRY }}" \
202204
-e "${{ env.DEV_CONTAINER_REGISTRY }}" \
203-
-d "gpu.${{ env.DOCKERFILE }}"
205+
-d "gpu.${{ env.DOCKERFILE }}" \
206+
-t "build"
204207
fi
205208
206209
git add requirements/*.txt ${{ env.DOCKERFILE }}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "Parent Images: Submodule Cleanup"
2+
3+
on:
4+
workflow_call:
5+
6+
env:
7+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
8+
9+
jobs:
10+
configure-branch-name:
11+
name: 'Configure Head Branch Name'
12+
runs-on: ubuntu-latest
13+
outputs:
14+
gh_head_ref: ${{ steps.configure-branch-name.outputs.gh_head_ref }}
15+
steps:
16+
- name: Configure branch name
17+
id: configure-branch-name
18+
run: echo "gh_head_ref=$(echo "${{ github.event.pull_request.head.ref }}" | sed 's|/|-|g')" >> $GITHUB_OUTPUT
19+
20+
pi-matrix:
21+
uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/pi_matrix.yml@dev
22+
secrets: inherit
23+
with:
24+
checkout_ref: parent-image-updates
25+
repository: "${{ github.repository_owner }}/refinery-submodule-parent-images"
26+
27+
gh-delete-branch:
28+
name: 'GitHub: Delete Branch'
29+
runs-on: ubuntu-latest
30+
needs: [configure-branch-name]
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
with:
35+
token: ${{ secrets.GH_TOKEN }}
36+
37+
- name: Delete Branch
38+
shell: bash
39+
run: git push origin --delete ${{ needs.configure-branch-name.outputs.gh_head_ref }} || true
40+
41+
gh-delete-app-branches:
42+
name: 'GitHub: Delete App Branches'
43+
runs-on: ubuntu-latest
44+
needs: [configure-branch-name, pi-matrix]
45+
strategy:
46+
matrix:
47+
app: ${{ fromJson(needs.pi-matrix.outputs.app) }}
48+
steps:
49+
- name: Checkout repository
50+
uses: actions/checkout@v4
51+
with:
52+
repository: ${{ github.repository_owner }}/${{ matrix.app }}
53+
token: ${{ secrets.GH_TOKEN }}
54+
55+
- name: Delete Branch
56+
shell: bash
57+
run: git push origin --delete ${{ needs.configure-branch-name.outputs.gh_head_ref }} || true

.github/workflows/pi_merge_parent_image.yml

Lines changed: 0 additions & 248 deletions
This file was deleted.

0 commit comments

Comments
 (0)