From a17037bab3728afdc7b48614aa4f4428429fc955 Mon Sep 17 00:00:00 2001 From: Sunny <55059942+snskArora@users.noreply.github.com> Date: Sat, 7 Jun 2025 21:20:52 +0530 Subject: [PATCH] Update Makefile --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fa64ca9..ee15ede 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ IMAGE_REPO=ghcr.io/trstringer/manual-approval -TARGET_PLATFORM=linux/amd64 +TARGET_PLATFORM=linux/amd64,linux/arm64,linux/arm/v8 .PHONY: tidy tidy: @@ -11,15 +11,18 @@ build: echo "VERSION is required"; \ exit 1; \ fi - docker build --platform $(TARGET_PLATFORM) -t $(IMAGE_REPO):$$VERSION . + docker build --platform $(TARGET_PLATFORM) -t $(IMAGE_REPO):$(VERSION) . -.PHONY: push +.PHONY: build_push push: @if [ -z "$(VERSION)" ]; then \ echo "VERSION is required"; \ exit 1; \ fi - docker push $(IMAGE_REPO):$(VERSION) + docker buildx create --use --name mybuilder + docker buildx build --push --platform $(TARGET_PLATFORM) -t $(IMAGE_REPO):$(VERSION) . + docker buildx rm mybuilder + .PHONY: test test: