Fix deprecated options in GoReleaser config (#1063)

* Fix deprecated goreleaser options

* Fix Docker COPY paths for goreleaser dockers_v2 platform layout

* Moved ARG definitions, smaller comment

* Update GoReleaser version to `v2.17.0`

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Enrico Candino <enrico.candino@suse.com>
This commit is contained in:
Copilot
2026-07-23 21:22:02 +02:00
committed by GitHub
co-authored by lnx01 Enrico Candino
parent ee8c16bdd2
commit 28bbecb7ee
6 changed files with 58 additions and 85 deletions
+2 -2
View File
@@ -10,8 +10,8 @@ permissions:
contents: read
env:
GORELEASER_VERSION: v2.15.2
GORELEASER_CHECKSUM_x86_64: 0ebdbf0353aba566b969dde746cc4e4806f96c27aa2f3971b229a9df7611fedc
GORELEASER_VERSION: v2.17.0
GORELEASER_CHECKSUM_x86_64: dde10e2d5a13cef969c0eec00c74f359c0ac306d702b1bd291ad9337b4e54c1d
jobs:
build:
+2 -2
View File
@@ -16,8 +16,8 @@ permissions:
id-token: write
env:
GORELEASER_VERSION: v2.15.2
GORELEASER_CHECKSUM_x86_64: 0ebdbf0353aba566b969dde746cc4e4806f96c27aa2f3971b229a9df7611fedc
GORELEASER_VERSION: v2.17.0
GORELEASER_CHECKSUM_x86_64: dde10e2d5a13cef969c0eec00c74f359c0ac306d702b1bd291ad9337b4e54c1d
jobs:
release:
+39 -74
View File
@@ -52,13 +52,15 @@ builds:
- -X "github.com/rancher/k3k/pkg/buildinfo.Version={{ .Tag }}"
archives:
- format: binary
- formats:
- binary
name_template: >-
{{ .Binary }}-{{- .Os }}-{{ .Arch }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
formats:
- zip
# For the image_templates we are using the following expression to build images for the correct registry
# {{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}
@@ -66,79 +68,42 @@ archives:
# REGISTRY= -> rancher/k3k:vX.Y.Z
# REGISTRY=ghcr.io -> ghcr.io/rancher/k3k:latest:vX.Y.Z
#
dockers:
# k3k amd64
- use: buildx
goarch: amd64
ids:
- k3k
- k3kcli
dockerfile: "package/Dockerfile.k3k"
skip_push: false
image_templates:
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}:{{ .Tag }}-amd64"
build_flag_templates:
- "--build-arg=BIN_K3K=k3k"
- "--build-arg=BIN_K3KCLI=k3kcli"
- "--pull"
- "--platform=linux/amd64"
# k3k arm64
- use: buildx
goarch: arm64
ids:
- k3k
- k3kcli
dockerfile: "package/Dockerfile.k3k"
skip_push: false
image_templates:
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}:{{ .Tag }}-arm64"
build_flag_templates:
- "--build-arg=BIN_K3K=k3k"
- "--build-arg=BIN_K3KCLI=k3kcli"
- "--pull"
- "--platform=linux/arm64"
# k3k-kubelet amd64
- use: buildx
goarch: amd64
ids:
- k3k-kubelet
dockerfile: "package/Dockerfile.k3k-kubelet"
skip_push: false
image_templates:
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}-kubelet:{{ .Tag }}-amd64"
build_flag_templates:
- "--build-arg=BIN_K3K_KUBELET=k3k-kubelet"
- "--pull"
- "--platform=linux/amd64"
# k3k-kubelet arm64
- use: buildx
goarch: arm64
ids:
- k3k-kubelet
dockerfile: "package/Dockerfile.k3k-kubelet"
skip_push: false
image_templates:
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}-kubelet:{{ .Tag }}-arm64"
build_flag_templates:
- "--build-arg=BIN_K3K_KUBELET=k3k-kubelet"
- "--pull"
- "--platform=linux/arm64"
docker_manifests:
dockers_v2:
# k3k
- name_template: "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}:{{ .Tag }}"
image_templates:
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}:{{ .Tag }}-amd64"
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}:{{ .Tag }}-arm64"
# k3k-kubelet arm64
- name_template: "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}-kubelet:{{ .Tag }}"
image_templates:
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}-kubelet:{{ .Tag }}-amd64"
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}-kubelet:{{ .Tag }}-arm64"
- id: k3k
ids:
- k3k
- k3kcli
dockerfile: "package/Dockerfile.k3k"
images:
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}"
tags:
- "{{ .Tag }}"
platforms:
- linux/amd64
- linux/arm64
build_args:
BIN_K3K: k3k
BIN_K3KCLI: k3kcli
flags:
- "--pull"
# k3k-kubelet
- id: k3k-kubelet
ids:
- k3k-kubelet
dockerfile: "package/Dockerfile.k3k-kubelet"
images:
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}-kubelet"
tags:
- "{{ .Tag }}"
platforms:
- linux/amd64
- linux/arm64
build_args:
BIN_K3K_KUBELET: k3k-kubelet
flags:
- "--pull"
changelog:
sort: asc
+1
View File
@@ -46,6 +46,7 @@ package: package-k3k package-k3k-kubelet ## Package the k3k and k3k-kubelet Dock
.PHONY: package-%
package-%:
docker build -f package/Dockerfile.$* \
--build-arg BIN_DIR=bin \
-t $(REPO)/$*:$(VERSION) \
-t $(REPO)/$*:latest \
-t $(REPO)/$*:dev .
+8 -4
View File
@@ -1,9 +1,13 @@
FROM registry.suse.com/bci/bci-base:16.1
ARG BIN_K3K=bin/k3k
ARG BIN_K3KCLI=bin/k3kcli
ARG BIN_K3K=k3k
ARG BIN_K3KCLI=k3kcli
COPY ${BIN_K3K} /usr/bin/
COPY ${BIN_K3KCLI} /usr/bin/
# BIN_DIR defaults to the buildx per-platform dir; override (e.g. BIN_DIR=bin) for flat layouts.
ARG TARGETPLATFORM
ARG BIN_DIR=${TARGETPLATFORM}
COPY ${BIN_DIR}/${BIN_K3K} /usr/bin/
COPY ${BIN_DIR}/${BIN_K3KCLI} /usr/bin/
CMD ["k3k"]
+6 -3
View File
@@ -1,8 +1,11 @@
# TODO: swicth this to BCI-micro or scratch. Left as base right now so that debug can be done a bit easier
FROM registry.suse.com/bci/bci-base:16.1
ARG BIN_K3K_KUBELET=bin/k3k-kubelet
ARG BIN_K3K_KUBELET=k3k-kubelet
COPY ${BIN_K3K_KUBELET} /usr/bin/
# BIN_DIR defaults to the buildx per-platform dir; override (e.g. BIN_DIR=bin) for flat layouts.
ARG TARGETPLATFORM
ARG BIN_DIR=${TARGETPLATFORM}
COPY ${BIN_DIR}/${BIN_K3K_KUBELET} /usr/bin/
ENTRYPOINT ["/usr/bin/k3k-kubelet"]