actions-docker/Makefile

19 lines
813 B
Makefile
Raw Normal View History

2024-08-18 17:27:33 +02:00
PLATFORMS=linux/amd64
2024-08-18 16:55:19 +02:00
help:
2024-08-18 16:56:39 +02:00
@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"
2024-08-18 16:55:19 +02:00
build:
2024-08-18 17:27:33 +02:00
docker buildx rm actions-docker || true
docker buildx create --name actions-docker --bootstrap --use
2024-08-18 18:04:05 +02:00
docker buildx build --platform ${PLATFORMS} -t git.staropensource.de/staropensource/actions-docker:latest -f Dockerfile .
docker buildx build --platform ${PLATFORMS} -t git.staropensource.de/staropensource/actions-docker:java -f Dockerfile.java .
2024-08-18 17:27:33 +02:00
docker buildx rm actions-docker
2024-08-18 16:55:19 +02:00
upload: build
docker push git.staropensource.de/staropensource/actions-docker:latest
2024-08-18 16:55:28 +02:00
docker push git.staropensource.de/staropensource/actions-docker:java
2024-08-18 16:56:39 +02:00
prune-cache:
docker buildx prune -af