@@ -233,7 +233,7 @@ runs:
233
233
tags : |
234
234
type=raw,value=${{ inputs.registry-tag-prefix }}${{ steps.semantic.outputs.release-version }}${{ inputs.registry-tag-suffix }}
235
235
236
- - name : build and push
236
+ - name : build and push rc container using inline cache
237
237
if : steps.semantic.outputs.new-release-published == 'true'
238
238
uses : docker/build-push-action@v5
239
239
id : build
@@ -251,6 +251,7 @@ runs:
251
251
cache-to : type=inline
252
252
cache-from : |
253
253
type=registry,ref=${{ steps.branch-recent-meta.outputs.tags }}
254
+ type=registry,ref=${{ steps.rc-recent-meta.outputs.tags }}
254
255
type=registry,ref=${{ steps.pr-recent-meta.outputs.tags }}
255
256
256
257
- name : cosign image with key
@@ -293,10 +294,22 @@ runs:
293
294
${{ inputs.registry }}/${{ inputs.registry-repo }}@${{ steps.build.outputs.digest }} \
294
295
${{ inputs.test-args }}
295
296
296
- - name : retag container
297
+ - name : build and push release container
297
298
if : steps.semantic.outputs.new-release-published == 'true'
298
- shell : bash
299
- run : docker buildx imagetools create -t ${{ steps.meta.outputs.tags }} ${{ inputs.registry }}/${{ inputs.registry-repo }}@${{ steps.build.outputs.digest }}
299
+ uses : docker/build-push-action@v5
300
+ id : build-release
301
+ with :
302
+ file : ${{ inputs.build-file }}
303
+ context : ${{ inputs.build-context }}
304
+ tags : |
305
+ ${{ steps.meta.outputs.tags }}
306
+ labels : ${{ steps.meta.outputs.labels }}
307
+ push : true
308
+ github-token : ${{ github.token }}
309
+ provenance : true
310
+ cache-from : |
311
+ type=registry,ref=${{ steps.rc-meta.outputs.tags }}
312
+ type=registry,ref=${{ steps.meta.outputs.tags }}
300
313
301
314
- name : cosign image with key
302
315
if : steps.semantic.outputs.new-release-published == 'true' && inputs.cosign-public-key != ''
@@ -307,14 +320,14 @@ runs:
307
320
COSIGN_PRIVATE_KEY : ${{ inputs.cosign-private-key }}
308
321
COSIGN_PASSWORD : ${{ inputs.cosign-password }}
309
322
TAGS : ${{ steps.meta.outputs.tags }}
310
- DIGEST : ${{ steps.build.outputs.digest }}
323
+ DIGEST : ${{ steps.build-release .outputs.digest }}
311
324
312
325
- name : cosign verify container
313
326
if : steps.semantic.outputs.new-release-published == 'true' && inputs.cosign-public-key != ''
314
327
env :
315
328
COSIGN_PUBLIC_KEY : ${{ inputs.cosign-public-key }}
316
329
TAG : ${{ steps.meta.outputs.tags }}
317
- DIGEST : ${{ steps.build.outputs.digest }}
330
+ DIGEST : ${{ steps.build-release .outputs.digest }}
318
331
shell : bash
319
332
run : |
320
333
cosign verify --key env://COSIGN_PUBLIC_KEY "${TAG}@${DIGEST}"
@@ -347,7 +360,7 @@ runs:
347
360
Pushed release container version ${{ steps.semantic.outputs.release-version }}!%0A
348
361
- %0A
349
362
docker pull ${{ steps.meta.outputs.tags }}%0A
350
- docker pull ${{ inputs.registry }}/${{ inputs.registry-repo }}@${{ steps.build.outputs.digest }}"
363
+ docker pull ${{ inputs.registry }}/${{ inputs.registry-repo }}@${{ steps.build-release .outputs.digest }}"
351
364
352
365
- name : update slack thread failure
353
366
uses : archive/github-actions-slack@v2.7.0
0 commit comments