Prepare for multiplatform support

This commit is contained in:
JeremyStar™ 2024-08-18 17:27:33 +02:00
parent a1a10d284f
commit 9beaa32cdf
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -1,11 +1,16 @@
PLATFORMS=linux/amd64
help: help:
@echo "make help Displays help" @echo "make help Displays help"
@echo " build Builds the image" @echo " build Builds the image"
@echo " upload Builds and uploads the image" @echo " upload Builds and uploads the image"
@echo " prune-cache Prunes the entire build cache" @echo " prune-cache Prunes the entire build cache"
build: build:
docker buildx build -t git.staropensource.de/staropensource/actions-docker:latest -f Dockerfile . docker buildx rm actions-docker || true
docker buildx build -t git.staropensource.de/staropensource/actions-docker:java -f Dockerfile.java . 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 upload: build
docker push git.staropensource.de/staropensource/actions-docker:latest docker push git.staropensource.de/staropensource/actions-docker:latest
docker push git.staropensource.de/staropensource/actions-docker:java docker push git.staropensource.de/staropensource/actions-docker:java