-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yaml
140 lines (134 loc) · 3.9 KB
/
.goreleaser.yaml
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
builds:
- &buildDefinition
id: ssh-portal
binary: ssh-portal
main: ./cmd/ssh-portal
ldflags:
- >
-s -w
-X "main.commit={{.Commit}}"
-X "main.date={{.Date}}"
-X "main.goVersion={{.Env.GOVERSION}}"
-X "main.projectName={{.ProjectName}}"
-X "main.version={{.Version}}"
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
- <<: *buildDefinition
id: ssh-portal-api
binary: ssh-portal-api
main: ./cmd/ssh-portal-api
- <<: *buildDefinition
id: ssh-token
binary: ssh-token
main: ./cmd/ssh-token
changelog:
use: github-native
sboms:
- artifacts: archive
signs:
- cmd: cosign
signature: "${artifact}.sig"
certificate: "${artifact}.pem"
args:
- "sign-blob"
- "--output-signature=${signature}"
- "--output-certificate=${certificate}"
- "${artifact}"
- "--yes"
artifacts: checksum
dockers:
# ssh-portal
- ids:
- ssh-portal
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal:{{ .Version }}-amd64"
use: buildx
build_flag_templates:
- "--build-arg=BINARY=ssh-portal"
- "--platform=linux/amd64"
- ids:
- ssh-portal
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal:{{ .Version }}-arm64v8"
use: buildx
goarch: arm64
build_flag_templates:
- "--build-arg=BINARY=ssh-portal"
- "--platform=linux/arm64/v8"
# ssh-portal-api
- ids:
- ssh-portal-api
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal-api:{{ .Version }}-amd64"
use: buildx
build_flag_templates:
- "--build-arg=BINARY=ssh-portal-api"
- "--platform=linux/amd64"
- ids:
- ssh-portal-api
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal-api:{{ .Version }}-arm64v8"
use: buildx
goarch: arm64
build_flag_templates:
- "--build-arg=BINARY=ssh-portal-api"
- "--platform=linux/arm64/v8"
# ssh-token
- ids:
- ssh-token
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-token:{{ .Version }}-amd64"
use: buildx
build_flag_templates:
- "--build-arg=BINARY=ssh-token"
- "--platform=linux/amd64"
- ids:
- ssh-token
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-token:{{ .Version }}-arm64v8"
use: buildx
goarch: arm64
build_flag_templates:
- "--build-arg=BINARY=ssh-token"
- "--platform=linux/arm64/v8"
docker_manifests:
# ssh-portal
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal:{{ .Version }}"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal:{{ .Version }}-arm64v8"
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal:latest"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal:{{ .Version }}-arm64v8"
# ssh-portal-api
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal-api:{{ .Version }}"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal-api:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal-api:{{ .Version }}-arm64v8"
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal-api:latest"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal-api:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-portal-api:{{ .Version }}-arm64v8"
# ssh-token
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-token:{{ .Version }}"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-token:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-token:{{ .Version }}-arm64v8"
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-token:latest"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-token:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/ssh-token:{{ .Version }}-arm64v8"
docker_signs:
- args:
- "sign"
- "${artifact}@${digest}"
- "--yes"
artifacts: all
output: true