From c42f25bd72e8b8d740af6c7cc4410507fc686b7e Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Thu, 15 Feb 2024 10:23:01 +0100 Subject: [PATCH] fix ko dockerhub builds (#1751) Signed-off-by: Kristoffer Dalby --- .goreleaser.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 9ef00fba..c6e3558f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -82,6 +82,10 @@ nfpms: kos: - id: ghcr repository: ghcr.io/juanfont/headscale + + # bare tells KO to only use the repository + # for tagging and naming the container. + bare: true base_image: gcr.io/distroless/base-debian12 build: headscale main: ./cmd/headscale @@ -99,12 +103,13 @@ kos: - "{{ .Major }}.{{ .Minor }}" - "{{ .Major }}" - "sha-{{ .ShortCommit }}" - - "{{ if not .Prerelease }}stable{{ end }}" + - "{{ if not .Prerelease }}stable{{ else }}unstable{{ end }}" - id: dockerhub build: headscale base_image: gcr.io/distroless/base-debian12 repository: headscale/headscale + bare: true platforms: - linux/amd64 - linux/386 @@ -118,9 +123,11 @@ kos: - "{{ .Major }}" - "sha-{{ .ShortCommit }}" - "{{ if not .Prerelease }}stable{{ end }}" + - "{{ if not .Prerelease }}stable{{ else }}unstable{{ end }}" - id: ghcr-debug repository: ghcr.io/juanfont/headscale + bare: true base_image: "debian:12" build: headscale main: ./cmd/headscale @@ -138,12 +145,13 @@ kos: - "{{ .Major }}.{{ .Minor }}-debug" - "{{ .Major }}-debug" - "sha-{{ .ShortCommit }}-debug" - - "{{ if not .Prerelease }}stable{{ end }}-debug" + - "{{ if not .Prerelease }}stable{{ else }}unstable{{ end }}-debug" - id: dockerhub-debug build: headscale base_image: "debian:12" repository: headscale/headscale + bare: true platforms: - linux/amd64 - linux/386 @@ -156,7 +164,7 @@ kos: - "{{ .Major }}.{{ .Minor }}-debug" - "{{ .Major }}-debug" - "sha-{{ .ShortCommit }}-debug" - - "{{ if not .Prerelease }}stable{{ end }}-debug" + - "{{ if not .Prerelease }}stable{{ else }}unstable{{ end }}-debug" checksum: name_template: "checksums.txt"