Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit f9fe6a4

Browse files
authored
push latest tag when building a release (#1636)
Signed-off-by: cpanato <ctadeu@gmail.com>
1 parent c31e5fe commit f9fe6a4

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

.goreleaser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ env:
55
- CGO_ENABLED=1
66
- DOCKER_CLI_EXPERIMENTAL=enabled
77
- COSIGN_EXPERIMENTAL=true
8+
- LATEST_TAG="--tags latest"
89

910
# Prevents parallel builds from stepping on each others toes downloading modules
1011
before:

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ KO_PREFIX ?= gcr.io/projectsigstore
5757
export KO_DOCKER_REPO=$(KO_PREFIX)
5858
GHCR_PREFIX ?= ghcr.io/sigstore/cosign
5959
COSIGNED_YAML ?= cosign-$(GIT_TAG).yaml
60+
LATEST_TAG ?=
6061

6162
.PHONY: all lint test clean cosign cross
6263
all: cosign
@@ -146,20 +147,20 @@ ko:
146147
$(create_kocache_path)
147148
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
148149
KOCACHE=$(KOCACHE_PATH) ko build --base-import-paths \
149-
--platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) \
150+
--platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) $(LATEST_TAG)\
150151
$(ARTIFACT_HUB_LABELS) \
151152
github.com/sigstore/cosign/cmd/cosign
152153

153154
# cosigned
154155
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
155156
KO_DOCKER_REPO=$(KO_PREFIX)/cosigned ko resolve --bare \
156-
--platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) \
157+
--platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) $(LATEST_TAG) \
157158
--filename config/ > $(COSIGNED_YAML)
158159

159160
# sget
160161
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
161162
KOCACHE=$(KOCACHE_PATH) ko build --base-import-paths \
162-
--platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) \
163+
--platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) $(LATEST_TAG)\
163164
$(ARTIFACT_HUB_LABELS) \
164165
github.com/sigstore/cosign/cmd/sget
165166

release/release.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,3 @@ copy-sget-signed-release-to-ghcr:
6868

6969
.PHONY: copy-signed-release-to-ghcr
7070
copy-signed-release-to-ghcr: copy-cosign-signed-release-to-ghcr copy-cosigned-signed-release-to-ghcr copy-sget-signed-release-to-ghcr
71-

0 commit comments

Comments
 (0)