Skip to content

Commit

Permalink
fix(ci): push multi-arch manifest (#3882)
Browse files Browse the repository at this point in the history
* fix(ci): push multi-arch manifest

* fix(ci): multi-arch build
  • Loading branch information
kolesnikovae authored Feb 3, 2025
1 parent 19d0fef commit bf7ee40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bf7ee40

Please sign in to comment.