Skip to content

Commit 8873292

Browse files
committed
use buildx to push timestamped tag
1 parent 541eb67 commit 8873292

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,18 @@ jobs:
118118
CREATED=${{ steps.vars.outputs.image_created }}
119119
tags: |
120120
quay.io/${{ env.IMAGE_REGISTRY_NAMESPACE }}/${{ env.IMAGE_REPOSITORY }}:${{ steps.vars.outputs.image_tag }}
121-
quay.io/${{ env.IMAGE_REGISTRY_NAMESPACE }}/${{ env.IMAGE_REPOSITORY }}:${{ steps.vars.outputs.image_tag }}-${{ steps.vars.outputs.timestamp }}
122121
platforms: linux/amd64,linux/arm64/v8
123122
labels: ${{ steps.vars.outputs.image_labels }}
124123
provenance: false
125124
target: JAVA_BASE_IMAGE
126125

126+
- name: Push additional image to quay.io
127+
env:
128+
SRC_IMAGE: quay.io/${{ env.IMAGE_REGISTRY_NAMESPACE }}/${{ env.IMAGE_REPOSITORY }}:${{ steps.vars.outputs.image_tag }}
129+
DST_IMAGE: ${{ env.IMAGE_REGISTRY_NAMESPACE }}/${{ env.IMAGE_REPOSITORY }}:${{ steps.vars.outputs.image_tag }}-${{ steps.vars.outputs.timestamp }}
130+
run: |
131+
docker buildx imagetools create ${{ env.SRC_IMAGE }} -t ${{ env.DST_IMAGE }}
132+
127133
- name: Push Image to docker.io
128134
if: github.ref_name == 'master'
129135
env:

0 commit comments

Comments
 (0)