From 6835cd1304cdee14811c275fb0367d2b007a3f0e Mon Sep 17 00:00:00 2001 From: Chaer Date: Mon, 30 Oct 2023 12:13:04 +0800 Subject: [PATCH] support docker manifests --- .goreleaser.yaml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index de3aaac0..4fdab8a2 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -105,8 +105,7 @@ release: dockers: - image_templates: - - 'kusionstack/{{ .ProjectName }}:{{ .Tag }}' - - 'kusionstack/{{ .ProjectName }}:latest' + - 'kusionstack/{{ .ProjectName }}:{{ .Tag }}-amd64' dockerfile: releaser.Dockerfile goos: linux goarch: amd64 @@ -118,4 +117,28 @@ dockers: - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" - "--label=org.opencontainers.image.source={{.GitURL}}" - - "--platform=linux/amd64" \ No newline at end of file + - "--platform=linux/amd64" +- image_templates: + - 'kusionstack/{{ .ProjectName }}:{{ .Tag }}-arm64' + dockerfile: releaser.Dockerfile + goos: linux + goarch: arm64 + use: docker + build_flag_templates: + - "--pull" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.name={{.ProjectName}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.source={{.GitURL}}" + - "--platform=linux/arm64" + +docker_manifests: +- name_template: 'kusionstack/{{ .ProjectName }}:{{ .Tag }}' + image_templates: + - 'kusionstack/{{ .ProjectName }}:{{ .Tag }}-amd64' + - 'kusionstack/{{ .ProjectName }}:{{ .Tag }}-arm64' +- name_template: 'kusionstack/{{ .ProjectName }}:latest' + image_templates: + - 'kusionstack/{{ .ProjectName }}:{{ .Tag }}-amd64' + - 'kusionstack/{{ .ProjectName }}:{{ .Tag }}-arm64' \ No newline at end of file