forked from tprasadtp/protonvpn-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
180 lines (164 loc) · 8.04 KB
/
.goreleaser.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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# This is goreleaser template.
project_name: protonvpn
# Snapshot Template
snapshot:
name_template: "{{.ShortCommit}}-dev"
# Skip builds
builds:
- skip: true
# Build docker images
dockers:
# amd64 image
- image_templates:
# GHCR Images
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .FullCommit }}-amd64'
build_flag_templates:
- --build-arg=VERSION={{ .Version }}
- --label=org.opencontainers.image.created={{.Date}}
- --label=org.opencontainers.image.revision={{.FullCommit}}
- --label=org.opencontainers.image.version={{.Version}}
# Vendor
- --label=org.opencontainers.image.vendor="Prasad Tengse <[email protected]>"
# Populated from Makefile Env
# We do not use GitURL because it might be SSH.
- --label=org.opencontainers.image.source={{.Env.PROJECT_SOURCE}}
- --label=org.opencontainers.image.title={{.Env.PROJECT_TITLE}}
- --label=org.opencontainers.image.description={{.Env.PROJECT_DESC}}
- --label=org.opencontainers.image.documentation={{.Env.PROJECT_URL}}
- --label=org.opencontainers.image.licenses={{.Env.PROJECT_LICENSE}}
- --label=org.opencontainers.image.url={{.Env.DOCKER_IMAGE_URL}}
# Custom Metadata
- --label=io.github.tprasadtp.metadata.version=6
# Build system Info. Useful to trace flaky builds on build machines
- --label=io.github.tprasadtp.metadata.build.system={{.Env.BUILD_SYSTEM }}-release
- --label=io.github.tprasadtp.metadata.build.number={{.Env.BUILD_NUMBER }}
- --label=io.github.tprasadtp.metadata.build.host={{.Env.BUILD_HOST }}
# Git Info
- --label=io.github.tprasadtp.metadata.git.commit={{.FullCommit}}
- --label=io.github.tprasadtp.metadata.git.branch={{.Branch }}
- --label=io.github.tprasadtp.metadata.git.treeState={{.Env.GIT_TREE_STATE}}
# We have an upstream!
- --label=io.github.tprasadtp.metadata.upstream.present=true
- --label=io.github.tprasadtp.metadata.upstream.version={{.Env.UPSTREAM_VERSION}}
- --label=io.github.tprasadtp.metadata.upstream.url={{.Env.UPSTREAM_URL}}
# Platform
- --platform=linux/amd64
<<: &docker_defaults
dockerfile: Dockerfile
use: buildx
extra_files:
- root/usr/bin/healthcheck
- root/etc/cont-init.d/70-vpn-setup
- root/etc/services.d/protonvpn/run
- root/usr/share/keyrings/just-containers.gpg
- root/usr/share/shlib/logger.sh
- root/requirements.txt
# ARM64 image
- image_templates:
# GHCR Images
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .FullCommit }}-arm64'
build_flag_templates:
- --build-arg=VERSION={{ .Version }}
- --label=org.opencontainers.image.created={{.Date}}
- --label=org.opencontainers.image.revision={{.FullCommit}}
- --label=org.opencontainers.image.version={{.Version}}
# Vendor
- --label=org.opencontainers.image.vendor="Prasad Tengse <[email protected]>"
# Populated from Makefile Env
# We do not use GitURL because it might be SSH.
- --label=org.opencontainers.image.source={{.Env.PROJECT_SOURCE}}
- --label=org.opencontainers.image.title={{.Env.PROJECT_TITLE}}
- --label=org.opencontainers.image.description={{.Env.PROJECT_DESC}}
- --label=org.opencontainers.image.documentation={{.Env.PROJECT_URL}}
- --label=org.opencontainers.image.licenses={{.Env.PROJECT_LICENSE}}
- --label=org.opencontainers.image.url={{.Env.DOCKER_IMAGE_URL}}
# Custom Metadata
- --label=io.github.tprasadtp.metadata.version=6
# Build system Info. Useful to trace flaky builds on build machines
- --label=io.github.tprasadtp.metadata.build.system={{.Env.BUILD_SYSTEM }}-release
- --label=io.github.tprasadtp.metadata.build.number={{.Env.BUILD_NUMBER }}
- --label=io.github.tprasadtp.metadata.build.host={{.Env.BUILD_HOST }}
# Git Info
- --label=io.github.tprasadtp.metadata.git.commit={{.FullCommit}}
- --label=io.github.tprasadtp.metadata.git.branch={{.Branch }}
- --label=io.github.tprasadtp.metadata.git.treeState={{.Env.GIT_TREE_STATE}}
# We have an upstream!
- --label=io.github.tprasadtp.metadata.upstream.present=true
- --label=io.github.tprasadtp.metadata.upstream.version={{.Env.UPSTREAM_VERSION}}
- --label=io.github.tprasadtp.metadata.upstream.url={{.Env.UPSTREAM_URL}}
# Platform
- --platform=linux/arm64
# Import defaults
<<: *docker_defaults
# ARM 32 Bit image
- image_templates:
# GHCR Images
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .Version }}-arm'
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .FullCommit }}-arm'
build_flag_templates:
- --build-arg=VERSION={{ .Version }}
- --label=org.opencontainers.image.created={{.Date}}
- --label=org.opencontainers.image.revision={{.FullCommit}}
- --label=org.opencontainers.image.version={{.Version}}
# Vendor
- --label=org.opencontainers.image.vendor="Prasad Tengse <[email protected]>"
# Populated from Makefile Env
# We do not use GitURL because it might be SSH.
- --label=org.opencontainers.image.source={{.Env.PROJECT_SOURCE}}
- --label=org.opencontainers.image.title={{.Env.PROJECT_TITLE}}
- --label=org.opencontainers.image.description={{.Env.PROJECT_DESC}}
- --label=org.opencontainers.image.documentation={{.Env.PROJECT_URL}}
- --label=org.opencontainers.image.licenses={{.Env.PROJECT_LICENSE}}
- --label=org.opencontainers.image.url={{.Env.DOCKER_IMAGE_URL}}
# Custom Metadata
- --label=io.github.tprasadtp.metadata.version=6
# Build system Info. Useful to trace flaky builds on build machines
- --label=io.github.tprasadtp.metadata.build.system={{.Env.BUILD_SYSTEM }}-release
- --label=io.github.tprasadtp.metadata.build.number={{.Env.BUILD_NUMBER }}
- --label=io.github.tprasadtp.metadata.build.host={{.Env.BUILD_HOST }}
# Git Info
- --label=io.github.tprasadtp.metadata.git.commit={{.FullCommit}}
- --label=io.github.tprasadtp.metadata.git.branch={{.Branch }}
- --label=io.github.tprasadtp.metadata.git.treeState={{.Env.GIT_TREE_STATE}}
# We have an upstream!
- --label=io.github.tprasadtp.metadata.upstream.present=true
- --label=io.github.tprasadtp.metadata.upstream.version={{.Env.UPSTREAM_VERSION}}
- --label=io.github.tprasadtp.metadata.upstream.url={{.Env.UPSTREAM_URL}}
# Platform
- --platform=linux/arm
# Import defaults
<<: *docker_defaults
# # Build manifests
docker_manifests:
# Full Version
- name_template: 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}'
image_templates:
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-arm'
# MAJOR.MINOR
- name_template: 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}{{ if .Prerelease }}-unstable{{ end }}'
image_templates:
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-arm'
# Commit SHA
- name_template: 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .FullCommit }}'
image_templates:
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .FullCommit }}-amd64'
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .FullCommit }}-arm64'
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .FullCommit }}-arm'
# Latest
- name_template: 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ if .Prerelease }}unstable{{else}}latest{{ end }}'
image_templates:
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-arm'
# Github Releases
release:
prerelease: auto
# Use git-chglog to generate release notes
changelog:
skip: true