-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
42 lines (32 loc) · 1.42 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
NAME := ghcr.io/alexandru/github-webhook-listener
TAG := $$(./scripts/new-version.sh)
IMG_JVM := ${NAME}:jvm-${TAG}
IMG_NATIVE := ${NAME}:native-${TAG}
LATEST_JVM := ${NAME}:jvm-latest
LATEST_NATIVE := ${NAME}:native-latest
LATEST := ${NAME}:latest
dependency-updates:
./gradlew dependencyUpdates \
-Drevision=release \
-DoutputFormatter=html \
--refresh-dependencies && \
open build/dependencyUpdates/report.html
init-docker:
docker buildx inspect mybuilder || docker buildx create --name mybuilder
docker buildx use mybuilder
build-jvm: init-docker
docker buildx build --platform linux/amd64,linux/arm64 -f ./src/main/docker/Dockerfile.jvm -t "${IMG_JVM}" -t "${LATEST_JVM}" ${DOCKER_EXTRA_ARGS} .
push-jvm:
DOCKER_EXTRA_ARGS="--push" $(MAKE) build-jvm
build-jvm-local:
docker build -f ./src/main/docker/Dockerfile.jvm -t "${IMG_JVM}" -t "${LATEST_JVM}" .
run-jvm: build-jvm-local
docker run -p 8080:8080 -ti ${LATEST_JVM}
build-native: init-docker
docker buildx build --platform linux/amd64,linux/arm64 -f ./src/main/docker/Dockerfile.native -t "${IMG_NATIVE}" -t "${LATEST_NATIVE}" -t "${LATEST}" ${DOCKER_EXTRA_ARGS} .
push-native:
DOCKER_EXTRA_ARGS="--push" $(MAKE) build-native
build-native-local:
docker build -f ./src/main/docker/Dockerfile.native -t "${IMG_NATIVE}" -t "${LATEST_NATIVE}" -t "${LATEST}" .
run-native: build-native-local
docker run -p 8080:8080 -ti ${LATEST_NATIVE}