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