build(docker):优化Docker构建流程
Some checks failed
Auto-build / Automatic-Packaging (push) Failing after 9m5s

- 移除了工作流中冗余的步骤注释
- 在Dockerfile中添加依赖预下载步骤
- 简化了构建命令结构
This commit is contained in:
Grand-cocoa 2025-11-12 13:55:00 +08:00
parent a73e314929
commit d8140d12db
2 changed files with 1 additions and 10 deletions

View File

@ -10,16 +10,6 @@ jobs:
steps: steps:
- name: Checkout Git Repo - name: Checkout Git Repo
uses: https://git.alina-dace.info/actions/checkout@v4 uses: https://git.alina-dace.info/actions/checkout@v4
- run: pwd
# - name: Set up JDK 17
# uses: https://git.alina-dace.info/actions/setup-java@v4
# with:
# java-version: '17'
# distribution: 'temurin'
# cache: maven
# - run: chmod +x ./mvnw
# - name: build
# run: ./mvnw clean package -DskipTests=true -P prod
- name: Docker build - name: Docker build
working-directory: ${{ env.CLONED_REPO_DIR }} working-directory: ${{ env.CLONED_REPO_DIR }}
run: docker build -t animo-server:latest ./ run: docker build -t animo-server:latest ./

View File

@ -1,6 +1,7 @@
FROM maven:3.8.4-openjdk-17 AS builder FROM maven:3.8.4-openjdk-17 AS builder
WORKDIR /app WORKDIR /app
COPY pom.xml . COPY pom.xml .
RUN mvn dependency:go-offline
COPY src ./src COPY src ./src
RUN mvn clean package -DskipTests=true -P prod RUN mvn clean package -DskipTests=true -P prod