初始化项目
Some checks failed
Java Maven 3.9.9 & JDK 26 CI/CD Pipeline / build-and-deploy (push) Failing after 3s

This commit is contained in:
Lee 2026-06-08 15:40:42 +08:00
parent c5dee7e444
commit 00fd9c81bb

View File

@ -16,8 +16,14 @@ jobs:
runs-on: centos-env
steps:
- name: 1. 拉取最新的仓库代码
uses: actions/checkout@v4
# 替换为以下纯命令形式docker:cli 镜像中默认自带 git
- name: 1. 拉取最新的仓库代码 (纯 Git 命令行模式)
run: |
# 清空当前工作目录,防止历史残留
rm -rf ./*
# 利用 Gitea 自动注入的内置变量,动态克隆当前仓库、当前分支、当前提交
git clone --depth 1 -b ${{ gitea.ref_name }} http://gitea-server:3000/${{ gitea.repository }} .
git checkout ${{ gitea.sha }}
- name: 2. 触发 Docker 容器内编译与镜像打包
run: |