Skip to content

Commit 03ad17a

Browse files
committed
ci(goreleaser): use docker_v2
1 parent 0ef1b98 commit 03ad17a

File tree

2 files changed

+23
-86
lines changed

2 files changed

+23
-86
lines changed

.goreleaser.yaml

Lines changed: 21 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ builds:
3737
goamd64:
3838
- v2
3939
- v3
40+
ignore:
41+
- goos: windows
42+
goarch: arm
4043
tags:
4144
- nomsgpack
4245
- grpcnotrace
@@ -67,6 +70,9 @@ builds:
6770
goamd64:
6871
- v2
6972
- v3
73+
ignore:
74+
- goos: windows
75+
goarch: arm
7076
tags:
7177
- nomsgpack
7278
- grpcnotrace
@@ -128,94 +134,24 @@ nfpms:
128134
# nix:
129135
# - name: go-judge
130136
# license: "mit"
131-
dockers:
132-
- image_templates:
133-
- "criyle/go-judge:{{ .Tag }}-amd64"
134-
use: buildx
137+
dockers_v2:
138+
- images:
139+
- criyle/go-judge
135140
dockerfile: "Dockerfile.goreleaser"
136-
goarch: amd64
137-
goamd64: v2
138-
extra_files:
139-
- "mount.yaml"
140-
build_flag_templates:
141-
- "--platform=linux/amd64"
142-
- image_templates:
143-
- "criyle/go-judge:{{ .Tag }}-arm64"
144-
use: buildx
145-
goarch: "arm64"
146-
dockerfile: "Dockerfile.goreleaser"
147-
extra_files:
148-
- "mount.yaml"
149-
build_flag_templates:
150-
- "--platform=linux/arm64"
151-
- image_templates:
152-
- "criyle/go-judge:{{ .Tag }}-armv7"
153-
use: buildx
154-
goarch: "arm"
155-
goarm: "7"
156-
dockerfile: "Dockerfile.goreleaser"
157-
extra_files:
158-
- "mount.yaml"
159-
build_flag_templates:
160-
- "--platform=linux/arm/v7"
161-
- image_templates:
162-
- "criyle/go-judge:{{ .Tag }}-armv5"
163-
use: buildx
164-
goarch: "arm"
165-
goarm: "5"
166-
dockerfile: "Dockerfile.goreleaser"
167-
extra_files:
168-
- "mount.yaml"
169-
build_flag_templates:
170-
- "--platform=linux/arm/v5"
171-
- image_templates:
172-
- "criyle/go-judge:{{ .Tag }}-ppc64le"
173-
use: buildx
174-
dockerfile: "Dockerfile.goreleaser"
175-
goarch: ppc64le
176-
extra_files:
177-
- "mount.yaml"
178-
build_flag_templates:
179-
- "--platform=linux/ppc64le"
180-
- image_templates:
181-
- "criyle/go-judge:{{ .Tag }}-s390x"
182-
use: buildx
183-
dockerfile: "Dockerfile.goreleaser"
184-
goarch: s390x
185-
extra_files:
186-
- "mount.yaml"
187-
build_flag_templates:
188-
- "--platform=linux/s390x"
189-
# Debian is now supporting riscv64 on trixie
190-
- image_templates:
191-
- "criyle/go-judge:{{ .Tag }}-riscv64"
192-
use: buildx
193-
dockerfile: "Dockerfile.goreleaser"
194-
goarch: riscv64
141+
tags:
142+
- "v{{ .Version }}"
143+
- "{{ if .IsNightly }}nightly{{ end }}"
144+
- "{{ if not .IsNightly }}latest{{ end }}"
195145
extra_files:
196146
- "mount.yaml"
197-
build_flag_templates:
198-
- "--platform=linux/riscv64"
199-
docker_manifests:
200-
- name_template: "criyle/go-judge:{{ .Tag }}"
201-
image_templates:
202-
- "criyle/go-judge:{{ .Tag }}-amd64"
203-
- "criyle/go-judge:{{ .Tag }}-arm64"
204-
- "criyle/go-judge:{{ .Tag }}-armv7"
205-
- "criyle/go-judge:{{ .Tag }}-armv5"
206-
- "criyle/go-judge:{{ .Tag }}-ppc64le"
207-
- "criyle/go-judge:{{ .Tag }}-s390x"
208-
- "criyle/go-judge:{{ .Tag }}-riscv64"
209-
- name_template: "criyle/go-judge:latest"
210-
image_templates:
211-
- "criyle/go-judge:{{ .Tag }}-amd64"
212-
- "criyle/go-judge:{{ .Tag }}-arm64"
213-
- "criyle/go-judge:{{ .Tag }}-armv7"
214-
- "criyle/go-judge:{{ .Tag }}-armv5"
215-
- "criyle/go-judge:{{ .Tag }}-ppc64le"
216-
- "criyle/go-judge:{{ .Tag }}-s390x"
217-
- "criyle/go-judge:{{ .Tag }}-riscv64"
218-
skip_push: auto
147+
platforms:
148+
- linux/amd64
149+
- linux/arm64
150+
- linux/armv7
151+
- linux/armv5
152+
- linux/ppc64le
153+
- linux/s390x
154+
- linux/riscv64
219155
checksum:
220156
name_template: "checksums.txt"
221157
snapshot:

Dockerfile.goreleaser

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM debian:latest
2+
ARG TARGETPLATFORM
23
WORKDIR /opt
34
ENTRYPOINT [ "/opt/go-judge" ]
4-
COPY go-judge mount.yaml /opt/
5+
COPY $TARGETPLATFORM/go-judge mount.yaml /opt/

0 commit comments

Comments
 (0)