Skip to content

Commit

Permalink
Use cache to build docker jvm image
Browse files Browse the repository at this point in the history
  • Loading branch information
murdos committed Apr 26, 2024
1 parent 3266169 commit e82b133
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/publish-jvm-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e82b133

Please sign in to comment.