From 8ac7028cf827e75229c0e741de489ebe370874ba Mon Sep 17 00:00:00 2001 From: Marvin Winkler Date: Sat, 6 Jul 2024 14:54:48 +0200 Subject: [PATCH] fixed latest push --- .github/workflows/docker-publish.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index eab3f73..f442643 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -97,6 +97,12 @@ jobs: # against the sigstore community Fulcio instance. run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign --yes {}@${{ steps.build-and-push-tagged.outputs.digest }} + - name: Build Docker Latest Tag + if: ${{ !endsWith(steps.docker_version_tag.outputs.tag, 'latest') }} + id: docker_latest_tag + run: | + $(echo "tag=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT + # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action - name: Build and push Docker image as latest @@ -106,7 +112,7 @@ jobs: with: context: . push: ${{ github.event_name != 'pull_request' }} - tags: latest + tags: ${{ steps.docker_latest_tag.outputs.tag }} platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha