Skip to content

Commit 41ec9ab

Browse files
committed
fixed latest push
1 parent 7295098 commit 41ec9ab

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/docker-publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ jobs:
9797
# against the sigstore community Fulcio instance.
9898
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign --yes {}@${{ steps.build-and-push-tagged.outputs.digest }}
9999

100+
- name: Build Docker Latest Tag
101+
if: ${{ !endsWith(steps.docker_version_tag.outputs.tag, 'latest') }}
102+
id: docker_latest_tag
103+
run: |
104+
$(echo "tag=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
105+
100106
# Build and push Docker image with Buildx (don't push on PR)
101107
# https://github.com/docker/build-push-action
102108
- name: Build and push Docker image as latest
@@ -106,7 +112,7 @@ jobs:
106112
with:
107113
context: .
108114
push: ${{ github.event_name != 'pull_request' }}
109-
tags: latest
115+
tags: ${{ steps.docker_latest_tag.outputs.tag }}
110116
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
111117
labels: ${{ steps.meta.outputs.labels }}
112118
cache-from: type=gha

0 commit comments

Comments
 (0)