更新 .gitea/workflows/.gitlab-ci.yml
This commit is contained in:
@@ -43,12 +43,27 @@ jobs:
|
||||
# run: |
|
||||
# apk add --no-cache git
|
||||
# git --version # 验证
|
||||
- name: Checkout
|
||||
uses: http://106.52.62.106:3000/unity-registry/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1 # 只拉取最新提交,不拉历史
|
||||
single-branch: true # 只拉取当前分支
|
||||
sparse-checkout: Assets/${{ matrix.module }}
|
||||
- name: Clone from Local Mirror
|
||||
run: |
|
||||
# 检查宿主机是否有镜像(需在 runner 上预置)
|
||||
if [ -d "/srv/cache/plugin-library.git" ]; then
|
||||
echo "使用本地裸库镜像..."
|
||||
git clone --reference /srv/cache/plugin-library.git \
|
||||
--depth=1 --filter=blob:none \
|
||||
--sparse \
|
||||
http://106.52.62.106:3000/root/plugin-library.git .
|
||||
else
|
||||
echo "首次克隆,创建本地镜像..."
|
||||
git clone --bare \
|
||||
http://106.52.62.106:3000/root/plugin-library.git \
|
||||
/srv/cache/plugin-library.git || true
|
||||
git clone --reference /srv/cache/plugin-library.git \
|
||||
--depth=1 --filter=blob:none \
|
||||
--sparse . .
|
||||
fi
|
||||
|
||||
# 配置稀疏检出
|
||||
git sparse-checkout set Assets/${{ matrix.module }}
|
||||
- name: Setup Node.js
|
||||
run: |
|
||||
ln -sf /srv/18-alpine/bin/node /usr/bin/node
|
||||
|
||||
Reference in New Issue
Block a user