From f3819653b833c318fd1a8ecbe65a3e8e24a1a29b Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 28 Jul 2026 20:59:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8D3=E4=B8=AA?= =?UTF-8?q?=E9=83=A8=E7=BD=B2bug=20-=20=E7=94=9F=E4=BA=A7=E6=9E=84?= =?UTF-8?q?=E5=BB=BA/Preview=E9=83=A8=E7=BD=B2/=E9=95=9C=E5=83=8F=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci-pipeline.yml | 2 +- .gitea/workflows/preview-deploy.yml | 10 +++++----- infra/docker/api.Dockerfile | 2 +- infra/docker/worker.Dockerfile | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/ci-pipeline.yml b/.gitea/workflows/ci-pipeline.yml index 195721213..6600486e6 100755 --- a/.gitea/workflows/ci-pipeline.yml +++ b/.gitea/workflows/ci-pipeline.yml @@ -1265,7 +1265,7 @@ jobs: docker buildx inspect --bootstrap - name: Build and push production ${{ matrix.service_display }} image (with retry) - shell: sh + shell: bash run: | set -eu REGISTRY="xiaoxia-registry.cn-hangzhou.cr.aliyuncs.com/xiaoxiakeji" diff --git a/.gitea/workflows/preview-deploy.yml b/.gitea/workflows/preview-deploy.yml index 22cd780ab..29744f814 100755 --- a/.gitea/workflows/preview-deploy.yml +++ b/.gitea/workflows/preview-deploy.yml @@ -111,15 +111,15 @@ jobs: CACHE_VALID=false if [ -f "$CACHE_HASH_FILE" ] && [ "$(cat "$CACHE_HASH_FILE")" = "$PACKAGE_LOCK_HASH" ] && [ -x "node_modules/.bin/vite" ] && [ -x "node_modules/.bin/tsc" ]; then CACHE_VALID=true - echo "Cache hit: dependencies valid, skipping npm ci" + echo "Cache hit: dependencies valid, skipping npm install" fi if [ "$CACHE_VALID" = "false" ]; then - echo "Cache miss or invalid: running npm ci..." - if ! npm ci --include=dev; then - echo "npm ci failed, cleaning node_modules and retrying..." + echo "Cache miss or invalid: running npm install..." + if ! npm install --include=dev; then + echo "npm install failed, cleaning node_modules and retrying..." rm -rf node_modules mkdir -p node_modules - npm ci --include=dev + npm install --include=dev fi echo "$PACKAGE_LOCK_HASH" > "$CACHE_HASH_FILE" echo "Dependencies installed, cache updated" diff --git a/infra/docker/api.Dockerfile b/infra/docker/api.Dockerfile index 06b338a38..3c993295a 100755 --- a/infra/docker/api.Dockerfile +++ b/infra/docker/api.Dockerfile @@ -4,7 +4,7 @@ # ============================================================ # 基础镜像:Python 3.12 -FROM python:3.12-slim-bookworm +FROM docker.m.daocloud.io/library/python:3.12-slim-bookworm # 使用阿里云镜像加速 RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources 2>/dev/null || \ diff --git a/infra/docker/worker.Dockerfile b/infra/docker/worker.Dockerfile index e2f130d4a..66350dc03 100755 --- a/infra/docker/worker.Dockerfile +++ b/infra/docker/worker.Dockerfile @@ -4,7 +4,7 @@ # ============================================================ # 基础镜像:Python 3.12 + ffmpeg -FROM python:3.12-slim-bookworm +FROM docker.m.daocloud.io/library/python:3.12-slim-bookworm # 使用阿里云镜像加速 RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources 2>/dev/null || \