diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72eddbcb..7810279b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,6 @@ jobs: - uses: DeterminateSystems/magic-nix-cache-action@main - name: Run goreleaser - run: nix develop --command -- goreleaser release --clean + run: nix develop --command -- goreleaser release --clean --verbose env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 07efe6f7..d3d38db0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -9,7 +9,7 @@ release: builds: - id: headscale - main: ./cmd/headscale/headscale.go + main: ./cmd/headscale mod_timestamp: "{{ .CommitTimestamp }}" env: - CGO_ENABLED=0 @@ -63,7 +63,6 @@ nfpms: bindir: /usr/bin formats: - deb - # - rpm contents: - src: ./config-example.yaml dst: /etc/headscale/config.yaml @@ -80,6 +79,44 @@ nfpms: postinstall: ./docs/packaging/postinstall.sh postremove: ./docs/packaging/postremove.sh +kos: + - id: ghcr + repository: ghcr.io/kradalby/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}}' + checksum: name_template: "checksums.txt" snapshot: diff --git a/Dockerfile b/Dockerfile index 367afe94..aa52b13d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,7 @@ -# Builder image +# This Dockerfile and the images produced are for testing headscale, +# and are in no way endorsed by Headscale's maintainers as an +# official nor supported release or distribution. + FROM docker.io/golang:1.21-bookworm AS build ARG VERSION=dev ENV GOPATH /go diff --git a/Dockerfile.debug b/Dockerfile.debug index 8f49d2bc..7a603b05 100644 --- a/Dockerfile.debug +++ b/Dockerfile.debug @@ -1,4 +1,7 @@ -# Builder image +# This Dockerfile and the images produced are for testing headscale, +# and are in no way endorsed by Headscale's maintainers as an +# official nor supported release or distribution. + FROM docker.io/golang:1.21-bookworm AS build ARG VERSION=dev ENV GOPATH /go diff --git a/Dockerfile.tailscale-HEAD b/Dockerfile.tailscale-HEAD index 2a3aac76..83ff9fe5 100644 --- a/Dockerfile.tailscale-HEAD +++ b/Dockerfile.tailscale-HEAD @@ -1,3 +1,7 @@ +# This Dockerfile and the images produced are for testing headscale, +# and are in no way endorsed by Headscale's maintainers as an +# official nor supported release or distribution. + FROM golang:latest RUN apt-get update \ diff --git a/flake.nix b/flake.nix index 3576e3a0..c3fc64bc 100644 --- a/flake.nix +++ b/flake.nix @@ -95,6 +95,7 @@ gotestsum gotests ksh + ko # 'dot' is needed for pprof graphs # go tool pprof -http=: