From 2112d9d7584addd416d5af90ad142d10873cf39a Mon Sep 17 00:00:00 2001 From: Lars Falk-Petersen Date: Thu, 12 Sep 2024 09:44:52 +0200 Subject: [PATCH] Tag as latest --- .github/workflows/docker-image.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 13c5181..6070bff 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -35,17 +35,22 @@ jobs: uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - + - name: Build and push Docker image id: push uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 with: context: . push: true - tags: ${{ steps.meta.outputs.tags }} latest + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + - name: Retag and push Docker image with additional tags + run: | + docker pull ${{ steps.meta.outputs.tags }} + docker tag ${{ steps.meta.outputs.tags }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: