@@ -211,7 +211,7 @@ jobs:
211211 dist/*
212212
213213 docker-build :
214- name : Build and Push Docker Image
214+ name : Build and Push Docker Images
215215 runs-on : large-olmocr-runner
216216 needs : [release]
217217 if : startsWith(github.ref, 'refs/tags/')
@@ -246,8 +246,8 @@ jobs:
246246 username : ${{ secrets.DOCKER_USERNAME }}
247247 password : ${{ secrets.DOCKER_PASSWORD }}
248248
249- - name : Extract metadata
250- id : meta
249+ - name : Extract metadata for base image
250+ id : meta-base
251251 uses : docker/metadata-action@v5
252252 with :
253253 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
@@ -258,18 +258,42 @@ jobs:
258258 flavor : |
259259 latest=true
260260
261- - name : Build and push Docker image
261+ - name : Build and push base Docker image
262262 uses : docker/build-push-action@v5
263263 with :
264264 context : .
265265 file : ./Dockerfile
266266 push : true
267- tags : ${{ steps.meta.outputs.tags }}
268- labels : ${{ steps.meta.outputs.labels }}
267+ tags : ${{ steps.meta-base .outputs.tags }}
268+ labels : ${{ steps.meta-base .outputs.labels }}
269269 platforms : linux/amd64
270270 outputs : type=registry
271271 no-cache : true
272272
273+ - name : Extract metadata for image with model
274+ id : meta-with-model
275+ uses : docker/metadata-action@v5
276+ with :
277+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
278+ tags : |
279+ type=ref,event=tag,suffix=-with-model
280+ type=semver,pattern={{version}}-with-model
281+ type=semver,pattern={{major}}.{{minor}}-with-model
282+ flavor : |
283+ latest=auto
284+ suffix=-with-model,onlatest=true
285+
286+ - name : Build and push Docker image with model
287+ uses : docker/build-push-action@v5
288+ with :
289+ context : .
290+ file : ./Dockerfile.with-model
291+ push : true
292+ tags : ${{ steps.meta-with-model.outputs.tags }}
293+ labels : ${{ steps.meta-with-model.outputs.labels }}
294+ platforms : linux/amd64
295+ outputs : type=registry
296+
273297 # jakep: push to beaker can't work because of limitted disk space on these runners
274298 # jakep: (you can try by setting load: true above, but you'll need a larger runner)
275299 # - name: Setup Beaker CLI
0 commit comments