Skip to content

Commit

Permalink
use buildx to push timestamped tag
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn committed Aug 5, 2024
1 parent 541eb67 commit e1c60a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,18 @@ jobs:
CREATED=${{ steps.vars.outputs.image_created }}
tags: |
quay.io/${{ env.IMAGE_REGISTRY_NAMESPACE }}/${{ env.IMAGE_REPOSITORY }}:${{ steps.vars.outputs.image_tag }}
quay.io/${{ env.IMAGE_REGISTRY_NAMESPACE }}/${{ env.IMAGE_REPOSITORY }}:${{ steps.vars.outputs.image_tag }}-${{ steps.vars.outputs.timestamp }}
platforms: linux/amd64,linux/arm64/v8
labels: ${{ steps.vars.outputs.image_labels }}
provenance: false
target: JAVA_BASE_IMAGE

- name: Push additional image to quay.io
env:
SRC_IMAGE: quay.io/${{ env.IMAGE_REGISTRY_NAMESPACE }}/${{ env.IMAGE_REPOSITORY }}:${{ steps.vars.outputs.image_tag }}
DST_IMAGE: quay.io/${{ env.IMAGE_REGISTRY_NAMESPACE }}/${{ env.IMAGE_REPOSITORY }}:${{ steps.vars.outputs.image_tag }}-${{ steps.vars.outputs.timestamp }}
run: |
docker buildx imagetools create ${{ env.SRC_IMAGE }} -t ${{ env.DST_IMAGE }}
- name: Push Image to docker.io
if: github.ref_name == 'master'
env:
Expand Down

0 comments on commit e1c60a0

Please sign in to comment.