From a1050672cd96d81efc44c35ba668f8c0bddcb719 Mon Sep 17 00:00:00 2001 From: Christian Rohmann Date: Mon, 1 Apr 2024 22:10:26 +0200 Subject: [PATCH] Create amd64, arm64, riscv64 container images and provide as multi-platform image --- .goreleaser.yml | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 2e5d160..00405ee 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -39,12 +39,43 @@ dockers: - ids: - prometheus-libvirt-exporter image_templates: - - ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }} + - ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-amd64 goos: linux goarch: amd64 dockerfile: goreleaser.dockerfile build_flag_templates: - "--build-arg=BINARY_NAME={{ .ProjectName }}" + - "--platform=linux/amd64" + use: buildx + - ids: + - prometheus-libvirt-exporter + image_templates: + - ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-arm64 + goos: linux + goarch: arm64 + dockerfile: goreleaser.dockerfile + build_flag_templates: + - "--build-arg=BINARY_NAME={{ .ProjectName }}" + - "--platform=linux/arm64" + use: buildx + - ids: + - prometheus-libvirt-exporter + image_templates: + - ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-riscv64 + goos: linux + goarch: riscv64 + dockerfile: goreleaser.dockerfile + build_flag_templates: + - "--build-arg=BINARY_NAME={{ .ProjectName }}" + - "--platform=linux/riscv64" + use: buildx + +docker_manifests: +- name_template: 'ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}' + image_templates: + - 'ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-amd64' + - 'ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-arm64' + - 'ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-riscv64' #Configuration for building packages for apk, deb and rpm package managers nfpms: @@ -83,6 +114,9 @@ release: name: prometheus-libvirt-exporter footer: | ## Docker Images - - ghrc.io/inovex/prometheus-libvirt-exporter:{{ trimprefix .Tag "v" }} + - ghcr.io/inovex/prometheus-libvirt-exporter:{{ trimprefix .Tag "v" }} (universal, multi-platform) + - ghcr.io/inovex/prometheus-libvirt-exporter:{{ trimprefix .Tag "v" }}-amd64 + - ghcr.io/inovex/prometheus-libvirt-exporter:{{ trimprefix .Tag "v" }}-arm64 + - ghcr.io/inovex/prometheus-libvirt-exporter:{{ trimprefix .Tag "v" }}-riscv64 #draft: true replace_existing_draft: true