From 56759f6b2ca818068c30c5630c19009876608bdf Mon Sep 17 00:00:00 2001 From: Anton Kolesnikov Date: Mon, 3 Feb 2025 12:10:26 +0800 Subject: [PATCH 1/2] fix(ci): push multi-arch manifest --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8a5cafea55..6ec994ce7b 100644 --- a/Makefile +++ b/Makefile @@ -232,10 +232,10 @@ define multiarch_build $(eval build_cmd=docker-image/pyroscope/$(if $(push_image),push,build)$(if $(debug_build),-debug)) $(eval image_name=$(IMAGE_PREFIX)$(shell basename $(@D)):$(if $(debug_build),debug.)$(IMAGE_TAG)) - GOOS=linux GOARCH=arm64 IMAGE_TAG="$(IMAGE_TAG)-arm64" IMAGE_PLATFORM=linux/arm64 $(MAKE) $(build_cmd) - GOOS=linux GOARCH=amd64 IMAGE_TAG="$(IMAGE_TAG)-amd64" IMAGE_PLATFORM=linux/amd64 $(MAKE) $(build_cmd) + GOOS=linux GOARCH=arm64 IMAGE_TAG="$(IMAGE_TAG)-arm64" $(MAKE) $(build_cmd) IMAGE_PLATFORM=linux/arm64 + GOOS=linux GOARCH=amd64 IMAGE_TAG="$(IMAGE_TAG)-amd64" $(MAKE) $(build_cmd) IMAGE_PLATFORM=linux/amd64 - $(if $(PUSH_IMAGE), \ + $(if $(push_image), \ docker manifest create --amend "$(image_name)" "$(image_name)-amd64" "$(image_name)-arm64" && \ docker manifest push "$(image_name)") endef From 37e1bf5cb49ccdd619c16a9be9bd02c9d98f5765 Mon Sep 17 00:00:00 2001 From: Anton Kolesnikov Date: Mon, 3 Feb 2025 12:18:26 +0800 Subject: [PATCH 2/2] fix(ci): multi-arch build --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05d352c236..2747ffcb7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -113,7 +113,7 @@ jobs: node-version: lts/hydrogen cache: yarn - name: Build image Pyroscope - run: make docker-image/pyroscope/build "BUILDX_ARGS=--cache-from=type=gha --cache-to=type=gha" + run: make docker-image/pyroscope/build-multiarch "BUILDX_ARGS=--cache-from=type=gha --cache-to=type=gha" build-push: if: github.event_name == 'push' && github.repository == 'grafana/pyroscope'