63
63
fetch-depth : 0
64
64
submodules : ' true'
65
65
66
- - name : GitHub Configuration
67
- run : git config --global url."https://oauth2:${{ secrets.GH_TOKEN }}@github.com".insteadOf https://github.com
68
-
69
66
- name : Set up Python
70
67
uses : actions/setup-python@v5
71
68
with :
@@ -74,32 +71,11 @@ jobs:
74
71
- name : Install Dependencies
75
72
run : python -m pip install pip-tools
76
73
77
- - name : Compile Artifacts
74
+ - name : Compile Requirements
78
75
run : |
79
76
cd ${{ github.workspace }}/submodules/parent-images
80
77
git checkout ${{ github.event.pull_request.head.ref }}
81
78
pip-compile requirements/${{ matrix.parent_image_type }}-requirements.in
82
-
83
- cd ${{ github.workspace }}
84
- git checkout ${{ github.event.pull_request.head.ref }} || git checkout -b ${{ github.event.pull_request.head.ref }}
85
- git push origin ${{ github.event.pull_request.head.ref }} && git pull origin ${{ github.event.pull_request.head.ref }}
86
-
87
- git config user.email "devtools@kern.ai"
88
- git config user.name "GitHub Actions"
89
-
90
- git add submodules
91
- git commit -m "ci: update submodules to origin/${{ github.event.pull_request.head.ref }}" || true
92
- git push origin ${{ github.event.pull_request.head.ref }}
93
-
94
- gh pr create \
95
- --title "${{ github.event.pull_request.title }}" \
96
- --body "${{ github.event.pull_request.body }}" \
97
- --base dev \
98
- --head ${{ github.event.pull_request.head.ref }} \
99
- --repo ${{ github.repository_owner }}/refinery-${{ matrix.parent_image_type }}-parent-image
100
-
101
- # - name: Clone cicd-deployment-scripts
102
- # run: git clone --branch parent-images https://github.com/code-kern-ai/cicd-deployment-scripts.git
103
79
104
80
- name : Set up Docker Buildx
105
81
uses : docker/setup-buildx-action@v3
@@ -118,58 +94,58 @@ jobs:
118
94
username : " ${{ env.DEV_LOGIN_USERNAME }}"
119
95
password : " ${{ env.DEV_LOGIN_PASSWORD }}"
120
96
121
- - name : Build & Push refinery-${{ matrix.parent_image_type }}-parent-image:dev
97
+ - name : Build & Push refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}
98
+ uses : docker/build-push-action@v5
99
+ with :
100
+ context : .
101
+ cache-from : type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-cache
102
+ cache-to : type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-cache,mode=max,image-manifest=true
103
+ platforms : linux/amd64
104
+ file : Dockerfile
105
+ tags : ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}
106
+ push : true
107
+ build-args : |
108
+ platform=linux/amd64
109
+ label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
110
+
111
+ - name : Build & Push refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64
112
+ uses : docker/build-push-action@v5
113
+ with :
114
+ context : .
115
+ cache-from : type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64-cache
116
+ cache-to : type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64-cache,mode=max,image-manifest=true
117
+ platforms : linux/arm64
118
+ file : Dockerfile
119
+ tags : ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64
120
+ push : true
121
+ build-args : |
122
+ platform=linux/arm64
123
+ label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
124
+
125
+ - name : Build & Push refinery-parent-images:sha-${{ matrix.parent_image_type }}
122
126
uses : docker/build-push-action@v5
123
127
with :
124
128
context : .
125
- cache-from : type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev -${{ matrix.parent_image_type }}-cache
126
- cache-to : type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev -${{ matrix.parent_image_type }}-cache,mode=max,image-manifest=true
129
+ cache-from : type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }} -${{ matrix.parent_image_type }}-cache
130
+ cache-to : type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }} -${{ matrix.parent_image_type }}-cache,mode=max,image-manifest=true
127
131
platforms : linux/amd64
128
132
file : Dockerfile
129
- tags : ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev -${{ matrix.parent_image_type }}
133
+ tags : ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }} -${{ matrix.parent_image_type }}
130
134
push : true
131
135
build-args : |
132
136
platform=linux/amd64
133
137
label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
134
138
135
- # - name: Build & Push refinery-${{ matrix.parent_image_type }}-parent-image:dev-arm64
136
- # uses: docker/build-push-action@v5
137
- # with:
138
- # context: .
139
- # cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev-${{ matrix.parent_image_type }}-arm64-cache
140
- # cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev-${{ matrix.parent_image_type }}-arm64-cache,mode=max,image-manifest=true
141
- # platforms: linux/arm64
142
- # file: Dockerfile
143
- # tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:dev-${{ matrix.parent_image_type }}-arm64
144
- # push: true
145
- # build-args: |
146
- # platform=linux/arm64
147
- # label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
148
-
149
- # - name: Build & Push refinery-${{ matrix.parent_image_type }}-parent-image:sha
150
- # uses: docker/build-push-action@v5
151
- # with:
152
- # context: .
153
- # cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-cache
154
- # cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-cache,mode=max,image-manifest=true
155
- # platforms: linux/amd64
156
- # file: Dockerfile
157
- # tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}
158
- # push: true
159
- # build-args: |
160
- # platform=linux/amd64
161
- # label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
162
-
163
- # - name: Build & Push refinery-${{ matrix.parent_image_type }}-parent-image:sha-arm64
164
- # uses: docker/build-push-action@v5
165
- # with:
166
- # context: .
167
- # cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64-cache
168
- # cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64-cache,mode=max,image-manifest=true
169
- # platforms: linux/arm64
170
- # file: Dockerfile
171
- # tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64
172
- # push: true
173
- # build-args: |
174
- # platform=linux/arm64
175
- # label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
139
+ - name : Build & Push refinery-parent-images:sha-${{ matrix.parent_image_type }}-arm64
140
+ uses : docker/build-push-action@v5
141
+ with :
142
+ context : .
143
+ cache-from : type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64-cache
144
+ cache-to : type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64-cache,mode=max,image-manifest=true
145
+ platforms : linux/arm64
146
+ file : Dockerfile
147
+ tags : ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64
148
+ push : true
149
+ build-args : |
150
+ platform=linux/arm64
151
+ label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
0 commit comments