diff --git a/.github/workflows/publish-jvm-docker-image.yml b/.github/workflows/publish-jvm-docker-image.yml index f98183885a2..8ac654c6fdd 100644 --- a/.github/workflows/publish-jvm-docker-image.yml +++ b/.github/workflows/publish-jvm-docker-image.yml @@ -43,3 +43,5 @@ jobs: push: ${{ startsWith(github.ref, 'refs/tags/v') }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/Dockerfile b/Dockerfile index 173e7b655f6..1dc9fb43882 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM openjdk:21-slim AS build COPY . /code/jhipster-app/ WORKDIR /code/jhipster-app/ -RUN chmod +x mvnw && ./mvnw package -B -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip +RUN --mount=type=cache,target=/root/.m2 chmod +x mvnw && ./mvnw package -B -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip RUN mv /code/jhipster-app/target/*-exec.jar /code/ FROM openjdk:21-slim