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