From cc9adebb5f39a916ce235eca0bc027b4e9e35862 Mon Sep 17 00:00:00 2001 From: Anton Bronnikov Date: Thu, 1 Feb 2024 16:03:20 +0200 Subject: [PATCH] [feat] build multiplatform docker images (`amd64` + `arm64`) --- .gitignore | 3 +++ .goreleaser.yaml | 30 +++++++++++++++++++++++++++--- Makefile | 2 +- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3f27cdc00f..05453f9f69 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,6 @@ profile.cov logs/ tests/spec-tests/ + +# goreleaser +/dist diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f04ae9991b..98b4cdfdd0 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -95,9 +95,33 @@ dockers: build_flag_templates: - --platform=linux/amd64 image_templates: - - "flashbots/suave-execution-geth:{{ .ShortCommit }}" - - "flashbots/suave-execution-geth:{{ .Tag }}" - - "flashbots/suave-execution-geth:latest" + - "flashbots/suave-execution-geth:{{ .ShortCommit }}-amd64" + - "flashbots/suave-execution-geth:{{ .Tag }}-amd64" + - "flashbots/suave-execution-geth:latest-amd64" + - dockerfile: ./Dockerfile.suave + use: buildx + goarch: arm64 + goos: linux + build_flag_templates: + - --platform=linux/arm64 + image_templates: + - "flashbots/suave-execution-geth:{{ .ShortCommit }}-arm64" + - "flashbots/suave-execution-geth:{{ .Tag }}-arm64" + - "flashbots/suave-execution-geth:latest-arm64" + +docker_manifests: + - name_template: "flashbots/suave-execution-geth:{{ .ShortCommit }}" + image_templates: + - "flashbots/suave-execution-geth:{{ .ShortCommit }}-amd64" + - "flashbots/suave-execution-geth:{{ .ShortCommit }}-arm64" + - name_template: "flashbots/suave-execution-geth:{{ .Tag }}" + image_templates: + - "flashbots/suave-execution-geth:{{ .Tag }}-amd64" + - "flashbots/suave-execution-geth:{{ .Tag }}-arm64" + - name_template: "flashbots/suave-execution-geth:latest" + image_templates: + - "flashbots/suave-execution-geth:latest-amd64" + - "flashbots/suave-execution-geth:latest-arm64" checksum: name_template: "checksums.txt" diff --git a/Makefile b/Makefile index d885443205..9661b5ed0f 100644 --- a/Makefile +++ b/Makefile @@ -48,4 +48,4 @@ release: -v `pwd`/sysroot:/sysroot \ -w /go/src/$(PACKAGE_NAME) \ ghcr.io/goreleaser/goreleaser-cross:v1.21 \ - release --clean + release --clean --auto-snapshot