Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goreleaser: nice and forkable #1584

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 27 additions & 18 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ project_name: dkron
release:
prerelease: auto

env:
- IMAGE_PREFIX={{ if index .Env "IMAGE_PREFIX" }}{{ .Env.IMAGE_PREFIX }}{{ else }}dkron{{ end }}

builds:
- &xbuild
main: .
Expand Down Expand Up @@ -107,7 +110,7 @@ snapshot:

dockers:
- image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-amd64
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-amd64"
dockerfile: Dockerfile.release
use: buildx
goos: linux
Expand All @@ -127,7 +130,7 @@ dockers:
- --platform=linux/amd64

- image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-arm64
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-arm64"
dockerfile: Dockerfile.release
use: buildx
goos: linux
Expand All @@ -137,7 +140,7 @@ dockers:
- --platform=linux/arm64/v8

- image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-armv7
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-armv7"
dockerfile: Dockerfile.release
use: buildx
goos: linux
Expand All @@ -148,7 +151,7 @@ dockers:
- --platform=linux/arm/v7

- image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-light-amd64
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light-amd64"
dockerfile: Dockerfile.release
use: buildx
goos: linux
Expand All @@ -159,7 +162,7 @@ dockers:
- --platform=linux/amd64

- image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-light-arm64
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light-arm64"
dockerfile: Dockerfile.release
use: buildx
goos: linux
Expand All @@ -169,7 +172,7 @@ dockers:
- --platform=linux/arm64/v8

- image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-light-armv7
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light-armv7"
dockerfile: Dockerfile.release
use: buildx
goos: linux
Expand All @@ -180,23 +183,29 @@ dockers:
- --platform=linux/arm/v7

docker_manifests:
- name_template: dkron/{{ .ProjectName }}:{{ .Version }}
- name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-arm64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-armv7"

- name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:latest"
image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-amd64
- dkron/{{ .ProjectName }}:{{ .Version }}-arm64
- dkron/{{ .ProjectName }}:{{ .Version }}-armv7
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-arm64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-armv7"

- name_template: dkron/{{ .ProjectName }}:latest
- name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light"
image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-amd64
- dkron/{{ .ProjectName }}:{{ .Version }}-arm64
- dkron/{{ .ProjectName }}:{{ .Version }}-armv7
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light-arm64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light-armv7"

- name_template: dkron/{{ .ProjectName }}:{{ .Version }}-light
- name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:light"
image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-light-amd64
- dkron/{{ .ProjectName }}:{{ .Version }}-light-arm64
- dkron/{{ .ProjectName }}:{{ .Version }}-light-armv7
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light-arm64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light-armv7"

changelog:
sort: asc
Expand Down
Loading