From 9beaa32cdfddcc475180fc022217cae5c2ba1887 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 17:27:33 +0200 Subject: [PATCH] Prepare for multiplatform support --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 80084bd..68644c9 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,16 @@ +PLATFORMS=linux/amd64 + help: @echo "make help Displays help" @echo " build Builds the image" @echo " upload Builds and uploads the image" @echo " prune-cache Prunes the entire build cache" build: - docker buildx build -t git.staropensource.de/staropensource/actions-docker:latest -f Dockerfile . - docker buildx build -t git.staropensource.de/staropensource/actions-docker:java -f Dockerfile.java . + docker buildx rm actions-docker || true + docker buildx create --name actions-docker --bootstrap --use + docker buildx build --push --platform ${PLATFORMS} -t git.staropensource.de/staropensource/actions-docker:latest -f Dockerfile . + docker buildx build --push --platform ${PLATFORMS} -t git.staropensource.de/staropensource/actions-docker:java -f Dockerfile.java . + docker buildx rm actions-docker upload: build docker push git.staropensource.de/staropensource/actions-docker:latest docker push git.staropensource.de/staropensource/actions-docker:java