-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
110 lines (97 loc) · 2.98 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
release:
prerelease: auto
draft: false
env:
# required to support multi architecture docker builds
- DOCKER_CLI_EXPERIMENTAL=enabled
- CGO_ENABLED=0
builds:
- id: linux-build
dir: ./
binary: openshift4_mirror
goos:
- linux
goarch:
- amd64
- arm64
# set the modified timestamp on the output binary to the git timestamp to ensure a reproducible build
mod_timestamp: &build-timestamp '{{ .CommitTimestamp }}'
ldflags: &build-ldflags |
-w
-s
-extldflags '-static'
- id: darwin-build
dir: ./
binary: openshift4_mirror
goos:
- darwin
goarch:
- amd64
- arm64
mod_timestamp: *build-timestamp
ldflags: *build-ldflags
- id: windows-build
dir: ./
binary: openshift4_build
goos:
- windows
goarch:
- amd64
mod_timestamp: *build-timestamp
ldflags: *build-ldflags
archives:
- id: linux-archives
builds:
- linux-build
# note: the signing process is depending on tar.gz archives. If this format changes then .github/scripts/apple-signing/*.sh will need to be adjusted
- id: darwin-archives
builds:
- darwin-build
- id: windows-archives
format: zip
builds:
- windows-build
dockers:
- image_templates:
# - shanedell/openshift4-mirror-go:latest
# - shanedell/openshift4-mirror-go:{{.Tag}}
- ghcr.io/shanedell/openshift4-mirror-go:latest
- ghcr.io/shanedell/openshift4-mirror-go:{{.Tag}}
goarch: amd64
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
- image_templates:
# - shanedell/openshift4-mirror-go:{{.Tag}}-arm64
- ghcr.io/shanedell/openshift4-mirror-go:{{.Tag}}-arm64
goarch: arm64
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
docker_manifests:
# - name_template: shanedell/openshift4-mirror-go:latest
# image_templates:
# - shanedell/openshift4-mirror-go:{{.Tag}}
# - shanedell/openshift4-mirror-go:{{.Tag}}-arm64
# - name_template: shanedell/openshift4-mirror-go:{{.Tag}}
# image_templates:
# - shanedell/openshift4-mirror-go:{{.Tag}}
# - shanedell/openshift4-mirror-go:{{.Tag}}-arm64
- name_template: ghcr.io/shanedell/openshift4-mirror-go:latest
image_templates:
- ghcr.io/shanedell/openshift4-mirror-go:{{.Tag}}
- ghcr.io/shanedell/openshift4-mirror-go:{{.Tag}}-arm64
- name_template: ghcr.io/shanedell/openshift4-mirror-go:{{.Tag}}
image_templates:
- ghcr.io/shanedell/openshift4-mirror-go:{{.Tag}}
- ghcr.io/shanedell/openshift4-mirror-go:{{.Tag}}-arm64