Skip to content

Commit

Permalink
chore: add single arch support
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Baryshev <[email protected]>
  • Loading branch information
dennybaa committed Jan 11, 2025
1 parent 9b58fd7 commit 4839c71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ jobs:

- name: Build multi-arch images and binaries
run: make clean multiarch-tar

6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ BATS_TEST ?= test
DOCKER ?= docker
export DOCKER
PLATFORM ?= linux/amd64
PLATFORM_ARCH = $(subst /,-,$(ARCH))
ARCH = $(shell echo "$(PLATFORM)" | sed -E 's!linux/([^/]+).*!\1!')
IMAGE_EXPORT_DIR = $(BUILD_DIR)/images/$@
BUILDX_BUILDER ?= podman-builder
Expand All @@ -40,6 +41,11 @@ multiarch-tar: BUILDX_OUTPUT = type=local,dest=$(IMAGE_EXPORT_DIR)
multiarch-tar: TAR_TARGET ?= tar
multiarch-tar: images tar-all

# Single arch builds don't have nested arch directory, thus set path as for multiarch
singlearch-tar: $(PLATFORM_ARCH)-tar
$(PLATFORM_ARCH)-tar: BUILDX_OUTPUT = type=local,dest=$(IMAGE_EXPORT_DIR)/linux_$(ARCH)
$(PLATFORM_ARCH)-tar: images tar

multiarch-images: BUILDX_OUTPUT = type=image
multiarch-images: images

Expand Down

0 comments on commit 4839c71

Please sign in to comment.