ci: revert artifact approach, use BuildKit cache for Maven deps
Gitea Actions doesn't support upload/download-artifact v4. Reverted to two-job approach (git clone + docker build). Added BuildKit cache mount (--mount=type=cache,target=/root/.m2) to Dockerfile so Maven deps persist across Docker builds on the same runner. First build downloads, subsequent builds are cached. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
# Dockerfile
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM eclipse-temurin:21-jdk-alpine AS build
|
||||
WORKDIR /build
|
||||
COPY .mvn/ .mvn/
|
||||
COPY mvnw pom.xml ./
|
||||
RUN ./mvnw dependency:go-offline -B
|
||||
RUN --mount=type=cache,target=/root/.m2/repository ./mvnw dependency:go-offline -B
|
||||
COPY src/ src/
|
||||
RUN ./mvnw package -DskipTests -B
|
||||
RUN --mount=type=cache,target=/root/.m2/repository ./mvnw package -DskipTests -B
|
||||
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
WORKDIR /app
|
||||
|
||||
Reference in New Issue
Block a user