setup ko image builder for goreleaser

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2023-04-28 11:59:19 +02:00
parent b1b90d165d
commit 8f6e269bac
No known key found for this signature in database
2 changed files with 44 additions and 2 deletions

View File

@ -9,7 +9,7 @@ release:
builds: builds:
- id: headscale - id: headscale
main: ./cmd/headscale/headscale.go main: ./cmd/headscale
mod_timestamp: "{{ .CommitTimestamp }}" mod_timestamp: "{{ .CommitTimestamp }}"
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=0
@ -63,7 +63,6 @@ nfpms:
bindir: /usr/bin bindir: /usr/bin
formats: formats:
- deb - deb
# - rpm
contents: contents:
- src: ./config-example.yaml - src: ./config-example.yaml
dst: /etc/headscale/config.yaml dst: /etc/headscale/config.yaml
@ -80,6 +79,48 @@ nfpms:
postinstall: ./docs/packaging/postinstall.sh postinstall: ./docs/packaging/postinstall.sh
postremove: ./docs/packaging/postremove.sh postremove: ./docs/packaging/postremove.sh
kos:
- id: ghcr
repository: ghcr.io/juanfont/headscale
base_image: gcr.io/distroless/base-debian11
build: headscale
main: ./cmd/headscale
env:
- CGO_ENABLED=0
platforms:
- linux/amd64
- linux/386
- linux/arm64
- linux/arm/v7
- linux/arm/v6
- linux/arm/v5
tags:
- latest
- '{{ .Tag }}'
- '{{ .Major }}.{{ .Minor }}.{{ .Patch }}'
- '{{ .Major }}.{{ .Minor }}'
- '{{ .Major }}'
- '{{ if not .Prerelease }}stable{{ end }}'
- id: dockerhub
build: headscale
base_image: gcr.io/distroless/base-debian11
repository: headscale/headscale
platforms:
- linux/amd64
- linux/386
- linux/arm64
- linux/arm/v7
- linux/arm/v6
- linux/arm/v5
tags:
- latest
- '{{ .Tag }}'
- '{{ .Major }}.{{ .Minor }}.{{ .Patch }}'
- '{{ .Major }}.{{ .Minor }}'
- '{{ .Major }}'
- '{{ if not .Prerelease }}stable{{ end }}'
checksum: checksum:
name_template: "checksums.txt" name_template: "checksums.txt"
snapshot: snapshot:

View File

@ -95,6 +95,7 @@
gotestsum gotestsum
gotests gotests
ksh ksh
ko
# 'dot' is needed for pprof graphs # 'dot' is needed for pprof graphs
# go tool pprof -http=: <source> # go tool pprof -http=: <source>