Skip to content

Commit d3b3743

Browse files
committed
🤖 ci: fix GoReleaser warnings
1 parent e7fe0e0 commit d3b3743

3 files changed

Lines changed: 35 additions & 23 deletions

File tree

‎.github/workflows/release.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
4040
with:
4141
distribution: goreleaser
42-
version: latest
42+
version: "~> v2"
4343
args: release --clean
4444
env:
4545
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.goreleaser.yaml‎

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: 2
2+
13
project_name: coder-k8s
24

35
before:
@@ -19,31 +21,39 @@ builds:
1921

2022
archives:
2123
- id: default
22-
format: tar.gz
24+
formats: [tar.gz]
2325
files:
24-
- none*
26+
- LICENSE
27+
- README.md
2528

26-
dockers:
29+
dockers_v2:
2730
- id: coder-k8s-image
28-
image_templates:
29-
- "ghcr.io/coder/coder-k8s:{{ .Version }}"
30-
- "ghcr.io/coder/coder-k8s:latest"
3131
dockerfile: Dockerfile.goreleaser
32-
use: buildx
33-
build_flag_templates:
34-
- "--pull"
35-
- "--platform=linux/amd64"
36-
- "--label=org.opencontainers.image.created={{ .Date }}"
37-
- "--label=org.opencontainers.image.source=https://github.com/coder/coder-k8s"
38-
- "--label=org.opencontainers.image.url=https://coder.github.io/coder-k8s/"
39-
- "--label=org.opencontainers.image.documentation=https://coder.github.io/coder-k8s/"
40-
- "--label=org.opencontainers.image.title=coder-k8s"
41-
- "--label=org.opencontainers.image.description=Kubernetes operator for Coder"
42-
- "--label=org.opencontainers.image.version={{ .Version }}"
43-
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
44-
- "--label=org.opencontainers.image.vendor=Coder"
45-
- "--label=org.opencontainers.image.licenses=Apache-2.0"
46-
- "--label=org.opencontainers.image.authors=Coder"
32+
ids:
33+
- coder-k8s
34+
images:
35+
- ghcr.io/coder/coder-k8s
36+
tags:
37+
- "{{ .Version }}"
38+
- latest
39+
platforms:
40+
- linux/amd64
41+
sbom: false
42+
labels:
43+
org.opencontainers.image.created: "{{ .Date }}"
44+
org.opencontainers.image.source: https://github.com/coder/coder-k8s
45+
org.opencontainers.image.url: https://coder.github.io/coder-k8s/
46+
org.opencontainers.image.documentation: https://coder.github.io/coder-k8s/
47+
org.opencontainers.image.title: coder-k8s
48+
org.opencontainers.image.description: Kubernetes operator for Coder
49+
org.opencontainers.image.version: "{{ .Version }}"
50+
org.opencontainers.image.revision: "{{ .FullCommit }}"
51+
org.opencontainers.image.vendor: Coder
52+
org.opencontainers.image.licenses: Apache-2.0
53+
org.opencontainers.image.authors: Coder
54+
flags:
55+
- "--pull=true"
56+
- "--provenance=false"
4757

4858
changelog:
4959
use: github

‎Dockerfile.goreleaser‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM gcr.io/distroless/static:nonroot
22

3+
ARG TARGETPLATFORM
4+
35
ENTRYPOINT ["/coder-k8s"]
4-
COPY coder-k8s /coder-k8s
6+
COPY $TARGETPLATFORM/coder-k8s /coder-k8s
57
USER nonroot:nonroot

0 commit comments

Comments
 (0)