-
Notifications
You must be signed in to change notification settings - Fork 26
/
.goreleaser.docker.yml
114 lines (112 loc) · 4.01 KB
/
.goreleaser.docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
version: 2
builds:
- id: "linux-amd64"
goos: ["linux"]
goarch: ["amd64"]
env: ["CC=gcc", "CGO_ENABLED=0"]
main: &main "./cmd/zed"
binary: &binary "zed"
mod_timestamp: &mod_timestamp "{{ .CommitTimestamp }}"
flags: &flags ["-trimpath"]
asmflags: &asmflags ["all=-trimpath={{ .Env.GITHUB_WORKSPACE }}"]
gcflags: &gcflags ["all=-trimpath={{ .Env.GITHUB_WORKSPACE }}"]
ldflags: &ldflags
- "-s -w"
- "-X github.com/jzelinskie/cobrautil/v2.Version=v{{ .Version }}"
- id: "linux-arm64"
goos: ["linux"]
goarch: ["arm64"]
env: ["CC=aarch64-linux-gnu-gcc", "CGO_ENABLED=0"]
main: *main
binary: *binary
mod_timestamp: *mod_timestamp
flags: *flags
asmflags: *asmflags
gcflags: *gcflags
ldflags: *ldflags
dockers:
# AMD64
- image_templates:
- &amd_image_quay "quay.io/authzed/zed:v{{ .Version }}-amd64"
- &amd_image_gh "ghcr.io/authzed/zed:v{{ .Version }}-amd64"
- &amd_image_dh "authzed/zed:v{{ .Version }}-amd64"
ids: ["linux-amd64"]
dockerfile: &dockerfile "Dockerfile.release"
goos: "linux"
goarch: "amd64"
use: "buildx"
build_flag_templates:
- "--platform=linux/amd64"
# AMD64 (debug)
- image_templates:
- &amd_debug_image_quay "quay.io/authzed/zed:v{{ .Version }}-amd64-debug"
- &amd_debug_image_gh "ghcr.io/authzed/zed:v{{ .Version }}-amd64-debug"
- &amd_debug_image_dh "authzed/zed:v{{ .Version }}-amd64-debug"
ids: ["linux-amd64"]
dockerfile: "Dockerfile.release"
goos: "linux"
goarch: "amd64"
use: "buildx"
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BASE=cgr.dev/chainguard/busybox:latest"
# ARM64
- image_templates:
- &arm_image_quay "quay.io/authzed/zed:v{{ .Version }}-arm64"
- &arm_image_gh "ghcr.io/authzed/zed:v{{ .Version }}-arm64"
- &arm_image_dh "authzed/zed:v{{ .Version }}-arm64"
ids: ["linux-arm64"]
dockerfile: *dockerfile
goos: "linux"
goarch: "arm64"
use: "buildx"
build_flag_templates:
- "--platform=linux/arm64"
# ARM64 (debug)
- image_templates:
- &arm_debug_image_quay "quay.io/authzed/zed:v{{ .Version }}-arm64-debug"
- &arm_debug_image_gh "ghcr.io/authzed/zed:v{{ .Version }}-arm64-debug"
- &arm_debug_image_dh "authzed/zed:v{{ .Version }}-arm64-debug"
ids: ["linux-arm64"]
dockerfile: *dockerfile
goos: "linux"
goarch: "arm64"
use: "buildx"
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=BASE=cgr.dev/chainguard/busybox:latest"
docker_manifests:
# Quay
- name_template: "quay.io/authzed/zed:v{{ .Version }}"
image_templates: [*amd_image_quay, *arm_image_quay]
- name_template: "quay.io/authzed/zed:latest"
image_templates: [*amd_image_quay, *arm_image_quay]
# GitHub Registry
- name_template: "ghcr.io/authzed/zed:v{{ .Version }}"
image_templates: [*amd_image_gh, *arm_image_gh]
- name_template: "ghcr.io/authzed/zed:latest"
image_templates: [*amd_image_gh, *arm_image_gh]
# Docker Hub
- name_template: "authzed/zed:v{{ .Version }}"
image_templates: [*amd_image_dh, *arm_image_dh]
- name_template: "authzed/zed:latest"
image_templates: [*amd_image_dh, *arm_image_dh]
# Debug Images:
# Quay (debug)
- name_template: "quay.io/authzed/zed:v{{ .Version }}-debug"
image_templates: [*amd_debug_image_quay, *arm_debug_image_quay]
- name_template: "quay.io/authzed/zed:latest-debug"
image_templates: [*amd_debug_image_quay, *arm_debug_image_quay]
# GitHub Registry
- name_template: "ghcr.io/authzed/zed:v{{ .Version }}-debug"
image_templates: [*amd_debug_image_gh, *arm_debug_image_gh]
- name_template: "ghcr.io/authzed/zed:latest-debug"
image_templates: [*amd_debug_image_gh, *arm_debug_image_gh]
# Docker Hub
- name_template: "authzed/zed:v{{ .Version }}-debug"
image_templates: [*amd_debug_image_dh, *arm_debug_image_dh]
- name_template: "authzed/zed:latest-debug"
image_templates: [*amd_debug_image_dh, *arm_debug_image_dh]
release:
disable: true