From 5651bcd85efdee44fd1958ee32baa8ab7e21b0c3 Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Fri, 23 Oct 2026 16:02:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Drone=20=E6=81=A2=E5=A4=8D=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=20clone=EF=BC=88depth=3D1=EF=BC=89=EF=BC=8C=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E6=85=A2=E9=80=9F=20apt=20=E5=AE=89=E8=A3=85=20git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .drone.yml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.drone.yml b/.drone.yml index ae0f3012..038660b2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,8 +1,6 @@ # zkxw:仅编译打包,不自动部署测试环境 # 触发:push / tag -# 产物:各 step 日志打印 artifacts sha256 -# -# 说明:关闭默认 clone(drone/git 难拉);分步构建以降低 3.6G 机器峰值内存。 +# 机器内存约 3.6G:分步构建 + 限制 Node 堆 kind: pipeline type: docker @@ -11,28 +9,16 @@ name: build-package concurrency: limit: 1 -clone: - disable: true - trigger: event: - push - tag -steps: - - name: clone - image: node:20-bookworm - environment: - GOGS_HTTP: http://101.35.245.122:3000 - commands: - - set -eu - - apt-get update -qq && apt-get install -y -qq git ca-certificates >/dev/null - - | - BRANCH="${DRONE_SOURCE_BRANCH:-${DRONE_BRANCH:-master}}" - echo "[CI] clone $GOGS_HTTP/wuzilong/zkxw.git branch=$BRANCH commit=${DRONE_COMMIT}" - git clone --depth 50 --branch "$BRANCH" "$GOGS_HTTP/wuzilong/zkxw.git" . - git checkout -q "$DRONE_COMMIT" +# 使用本机已预拉的 drone/git(默认 clone 镜像) +clone: + depth: 1 +steps: - name: build-web-admin image: node:20-bookworm environment: