20 lines
983 B
Makefile
20 lines
983 B
Makefile
PLATFORMS=linux/amd64
|
|
|
|
help:
|
|
@echo "make help Displays help"
|
|
@echo " build Builds the image"
|
|
@echo " upload Builds and uploads the image"
|
|
@echo " upload-only Uploads the image only, in case it fails"
|
|
@echo " prune-cache Prunes the entire build cache"
|
|
build:
|
|
docker buildx rm actions-docker || true
|
|
docker buildx create --bootstrap --name actions-docker --platform ${PLATFORMS}
|
|
docker buildx build --builder actions-docker --load --platform ${PLATFORMS} --target base -t git.staropensource.de/infrastructure/actions-docker:latest .
|
|
docker buildx build --builder actions-docker --load --platform ${PLATFORMS} --target java -t git.staropensource.de/infrastructure/actions-docker:java .
|
|
docker buildx rm actions-docker
|
|
upload: build upload-only
|
|
upload-only:
|
|
docker push git.staropensource.de/infrastructure/actions-docker:latest
|
|
docker push git.staropensource.de/infrastructure/actions-docker:java
|
|
prune-cache:
|
|
docker buildx prune -af
|