Animo-Server/.gitea/workflows/auto-build.yaml
Grand-cocoa a73e314929
All checks were successful
Auto-build / Automatic-Packaging (push) Successful in 6m6s
feat(docker):优化Docker构建流程并更新构建环境
- 引入Maven构建阶段,使用多阶段构建优化镜像大小
- 更新Dockerfile以支持JDK17的构建环境
- 从Git工作流中移除冗余的JDK设置和Maven命令
- 使用COPY指令替代ADD指令以提高Docker层缓存效率
- 确保构建产物正确复制到最终镜像中
2025-11-12 13:46:52 +08:00

26 lines
779 B
YAML

name: Auto-build
run-name: Automatic-Packaging 📦
on: [ push ]
env:
BARE_REPO_DIR: https://git.alina-dace.info/Dace/Animo-Server.git
CLONED_REPO_DIR: ./
jobs:
Automatic-Packaging:
runs-on: ubuntu-latest
steps:
- name: Checkout Git Repo
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
working-directory: ${{ env.CLONED_REPO_DIR }}
run: docker build -t animo-server:latest ./