-
Notifications
You must be signed in to change notification settings - Fork 7
/
.goreleaser.yml
77 lines (63 loc) · 2.32 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
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
# Blog to build multiarch images with GH, docker buildx and manifests
# https://carlosbecker.com/posts/multi-platform-docker-images-goreleaser-gh-actions/
# Setup Multiarch builds with docker and QEMU, restart docker service!
# https://github.com/docker/buildx#building-multi-platform-images
version: 2
builds:
- env:
- CGO_ENABLED=0 # this is needed to build the single binary
goarch:
- amd64
- arm64
goos:
- linux
archives:
- format: binary
name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-snapshot"
dockers:
- image_templates:
- "ghcr.io/ccremer/zfs-provisioner:v{{ .Version }}-amd64"
extra_files:
- docker/zfs.sh
- docker/update-permissions.sh
goarch: amd64
dockerfile: docker/Dockerfile
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/ccremer/zfs-provisioner:v{{ .Version }}-arm64"
extra_files:
- docker/zfs.sh
- docker/update-permissions.sh
goarch: arm64
dockerfile: docker/Dockerfile
use: buildx
build_flag_templates:
- "--platform=linux/arm64/v8"
docker_manifests:
# For prereleases, updating `latest` and the floating tags of the major version does not make sense.
# Only the image for the exact version should be pushed.
- name_template: "{{ if not .Prerelease }}ghcr.io/ccremer/zfs-provisioner:latest{{ end }}"
image_templates:
- "ghcr.io/ccremer/zfs-provisioner:v{{ .Version }}-amd64"
- "ghcr.io/ccremer/zfs-provisioner:v{{ .Version }}-arm64"
- name_template: "{{ if not .Prerelease }}ghcr.io/ccremer/zfs-provisioner:v{{ .Major }}{{ end }}"
image_templates:
- "ghcr.io/ccremer/zfs-provisioner:v{{ .Version }}-amd64"
- "ghcr.io/ccremer/zfs-provisioner:v{{ .Version }}-arm64"
- name_template: "ghcr.io/ccremer/zfs-provisioner:v{{ .Version }}"
image_templates:
- "ghcr.io/ccremer/zfs-provisioner:v{{ .Version }}-amd64"
- "ghcr.io/ccremer/zfs-provisioner:v{{ .Version }}-arm64"
release:
prerelease: auto
github:
owner: ccremer
name: kubernetes-zfs-provisioner