Compare commits

...

12 Commits

Author SHA1 Message Date
XiaoXia Bot f17e607ad2 fix(ci): 修复build-staging在PR模式下被跳过的问题
CI Build & Deploy / Build Staging API Image (push) Failing after 32s
CI/CD Pipeline / Frontend Lint (push) Failing after 35s
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 2m10s
CI/CD Pipeline / Unit Tests (push) Successful in 2m12s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 1m51s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 2m12s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 2m21s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m32s
CI/CD Pipeline / Integration Tests (push) Successful in 1m46s
CI Build & Deploy / Build Staging Worker Image (pull_request) Failing after 40m1s
CI Build & Deploy / Staging API Integration Tests (push) Failing after 1509h42m49s
CI Build & Deploy / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1509h42m49s
CI Build & Deploy / Staging API Integration Tests (pull_request) Failing after 1509h51m19s
CI Build & Deploy / Staging E2E Tests (pull_request) Failing after 1509h51m20s
CI Build & Deploy / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1509h51m20s
CI Build & Deploy / Production Browser E2E (pull_request) Failing after 1510h31m20s
CI Build & Deploy / Deploy Production (pull_request) Failing after 1510h31m22s
CI Build & Deploy / Production Browser E2E (push) Failing after 1510h31m22s
CI Build & Deploy / Deploy Production (push) Failing after 1510h31m22s
CI Build & Deploy / Build Production Worker Image (pull_request) Failing after 1510h31m23s
CI Build & Deploy / Build Production Web Image (pull_request) Failing after 1510h31m23s
CI Build & Deploy / Build Production API Image (pull_request) Failing after 1510h31m23s
CI Build & Deploy / Build Production Worker Image (push) Failing after 1510h31m23s
CI Build & Deploy / Build Production Web Image (push) Failing after 1510h31m23s
CI Build & Deploy / Build Production API Image (push) Failing after 1510h31m23s
CI Build & Deploy / Build Staging Web Image (push) Has been skipped
CI Build & Deploy / Build Staging Worker Image (push) Has been skipped
CI Build & Deploy / Staging E2E Tests (push) Failing after 1510h14m32s
CI Build & Deploy / Build Staging API Image (pull_request) Has been skipped
CI Build & Deploy / Build Staging Web Image (pull_request) Has been skipped
2026-07-15 16:58:43 +08:00
XiaoXia Bot 3cb232a84d feat(ci): 拆分构建workflow + buildx动态命名
CI/CD Pipeline / Frontend Lint (push) Successful in 59s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 52s
CI/CD Pipeline / Unit Tests (push) Successful in 2m7s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 2m4s
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 2m28s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 2m24s
CI/CD Pipeline / Integration Tests (push) Successful in 1m28s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m23s
CI Build & Deploy / Production Browser E2E (pull_request) Failing after 1510h40m44s
CI Build & Deploy / Staging E2E Tests (pull_request) Failing after 1510h40m44s
CI Build & Deploy / Deploy Production (pull_request) Failing after 1510h40m46s
CI Build & Deploy / Build Production Worker Image (pull_request) Failing after 1510h40m48s
CI Build & Deploy / Build Production Web Image (pull_request) Failing after 1510h40m48s
CI Build & Deploy / Build Staging Worker Image (pull_request) Failing after 1510h40m48s
CI Build & Deploy / Build Staging Web Image (pull_request) Failing after 1510h40m48s
CI Build & Deploy / Build Staging API Image (pull_request) Failing after 1510h40m48s
CI Build & Deploy / Production Browser E2E (push) Failing after 1510h41m2s
CI Build & Deploy / Staging E2E Tests (push) Failing after 1510h41m3s
CI Build & Deploy / Deploy Production (push) Failing after 1510h41m3s
CI Build & Deploy / Build Production Worker Image (push) Failing after 1510h41m4s
CI Build & Deploy / Build Production Web Image (push) Failing after 1510h41m4s
CI Build & Deploy / Build Staging Worker Image (push) Failing after 1510h41m4s
CI Build & Deploy / Build Staging Web Image (push) Failing after 1510h41m4s
CI Build & Deploy / Build Staging API Image (push) Failing after 1510h41m4s
CI Build & Deploy / Staging API Integration Tests (pull_request) Failing after 1511h12m27s
CI Build & Deploy / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1511h12m29s
CI Build & Deploy / Build Production API Image (pull_request) Failing after 1511h12m31s
CI Build & Deploy / Staging API Integration Tests (push) Failing after 1511h12m46s
CI Build & Deploy / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1511h12m47s
CI Build & Deploy / Build Production API Image (push) Failing after 1511h12m47s
问题1 - cancel-in-progress踩踏:
- 将构建类job拆分到独立的 .gitea/workflows/ci-build.yml
- 新workflow cancel-in-progress: false,构建启动后不被新commit顶掉
- 原ci-cd.yml保留4个门禁job(validate/unit/integration/frontend-lint)
- 门禁workflow保持cancel-in-progress: true,快速响应新commit

问题2 - buildx name冲突:
- 所有 docker buildx create/use/rm 的 ci-builder 改为动态名
- 动态命名:ci-builder-${{ github.run_id }}-${{ github.job }}
- 每个job每个run独立builder实例,多runner同机构建不冲突

变更统计:
- ci-cd.yml:910行 → 406行(仅门禁)
- ci-build.yml:新增535行(构建+部署+E2E)
- buildx实例:10处引用全部动态化
2026-07-15 16:49:04 +08:00
XiaoXia Bot 370c3923ae fix: migration diff步骤真正修复 — 传入GITHUB_SERVER_URL
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Failing after 1512h9m11s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1512h9m13s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1512h9m13s
CI/CD Pipeline / Build Production API Image (push) Failing after 1512h9m13s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been skipped
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Failing after 1512h40m54s
- 根因:Gitea Actions不提供GITHUB_SERVER_URL环境变量
- PR #361只加了set +e && exit 0绕过,未解决根因
- 现在通过env传入github.server_url,恢复set -eu错误处理
2026-07-15 15:20:20 +08:00
XiaoXia Bot 771c5ba579 fix: 修复matrix构建参数错位 — 去掉行续反斜杠\n问题
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Failing after 1512h10m20s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1512h10m22s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1512h10m22s
CI/CD Pipeline / Build Production API Image (push) Failing after 1512h10m22s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Failing after 1512h42m2s
- \\n在YAML->shell多层转义后变成字面字符n,导致参数错位
- dockerfile路径被当作image tag,API/Worker 3秒即挂
- 去掉行续反斜杠,所有参数写在一行,空格分隔
2026-07-15 15:19:07 +08:00
XiaoXia Bot 2e59d4a275 fix: 精确修复matrix构建Build and push步骤换行问题
CI/CD Pipeline / Build Staging Worker Image (push) Failing after 3s
CI/CD Pipeline / Build Staging API Image (push) Failing after 3s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 1m29s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1512h12m47s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1512h12m48s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1512h15m57s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1512h15m59s
CI/CD Pipeline / Deploy Production (push) Failing after 1512h15m58s
CI/CD Pipeline / Build Production API Image (push) Failing after 1512h15m59s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been skipped
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1512h44m30s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1512h47m41s
- 仅修改build-staging和build-production的Build and push步骤
- 将多行双引号字符串改为
转义单行格式
- 之前的修复误改了checkout等其他步骤,导致全链路CI崩溃
2026-07-15 15:13:33 +08:00
XiaoXia Bot f905c3ef8d fix: 构建前清理本地旧镜像,解决 buildx --load image already exists 错误
CI/CD Pipeline / Unit Tests (push) Failing after 0s
CI/CD Pipeline / Frontend Lint (push) Failing after 0s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 2s
CI/CD Pipeline / Integration Tests (push) Failing after 0s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1512h18m33s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1512h18m35s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1512h18m36s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 1512h18m36s
CI/CD Pipeline / Build Staging API Image (push) Failing after 1512h18m36s
CI/CD Pipeline / Build Production API Image (push) Failing after 1512h18m38s
CI/CD Pipeline / Deploy Production (push) Failing after 1512h18m37s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1512h18m38s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1512h50m15s
CI/CD Pipeline / Build Staging Worker Image (push) Failing after 1512h50m18s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1512h50m20s
2026-07-15 15:11:31 +08:00
XiaoXia Bot 46c7c351af Merge remote-tracking branch 'origin/develop' into develop
CI/CD Pipeline / Unit Tests (push) Failing after 0s
CI/CD Pipeline / Frontend Lint (push) Failing after 0s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 3s
CI/CD Pipeline / Integration Tests (push) Failing after 0s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1512h39m41s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1512h39m41s
CI/CD Pipeline / Deploy Production (push) Failing after 1512h39m42s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1512h39m42s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 1512h39m42s
CI/CD Pipeline / Build Staging API Image (push) Failing after 1512h39m42s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1512h39m42s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1512h39m42s
CI/CD Pipeline / Build Production API Image (push) Failing after 1512h39m42s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1513h11m23s
CI/CD Pipeline / Build Staging Worker Image (push) Failing after 1513h11m24s
2026-07-15 14:50:23 +08:00
XiaoXia Bot f411dd0e1f fix: 修复matrix构建run命令换行符丢失问题
- matrix重构时Build and push步骤用了YAML多行双引号字符串
- act_runner解析时实际换行被替换为空格,导致变量未定义(set -eu)
- 改为\n转义格式,与其他step保持一致
- 修复build-staging和build-production两处matrix job
2026-07-15 14:50:08 +08:00
CI Bot 09a4dbe04c fix: formatDuration 不取整导致显示浮点数秒(如 9.542993秒)
CI/CD Pipeline / Build Staging API Image (push) Failing after 2s
CI/CD Pipeline / Build Staging Worker Image (push) Failing after 2s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 1m58s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1512h46m5s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1512h46m6s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1512h49m31s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1512h49m32s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1512h49m32s
CI/CD Pipeline / Build Production API Image (push) Failing after 1512h49m32s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been skipped
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1513h17m47s
CI/CD Pipeline / Deploy Production (push) Failing after 1513h21m13s
全局搜索发现 4 处 formatDuration 函数中 seconds % 60 未做取整,
当后端返回浮点数 total_duration 时直接拼接显示。

修复:先 Math.round(seconds) 再取模,影响页面:
- 剪辑计划列表页(EditPlans.tsx)
- 模板库页面(TemplateLibrary.tsx)
- 查重详情页(DuplicationDetail.tsx)
- 查重结果页(DuplicationResults.tsx)
2026-07-15 14:39:55 +08:00
XiaoXia Bot 533a64e215 feat(ci): M-3 三镜像matrix并行构建重构 (#365)
CI/CD Pipeline / Build Staging API Image (push) Failing after 2s
CI/CD Pipeline / Build Staging Worker Image (push) Failing after 2s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 1m19s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1513h4m13s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1513h6m57s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1513h4m13s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1513h6m58s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1513h4m15s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1513h6m55s
CI/CD Pipeline / Build Production API Image (push) Failing after 1513h6m58s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been skipped
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Failing after 1513h38m38s
- 6个独立构建job → 2个matrix job(build-staging + build-production)
- workflow从1186行→937行(-21%)
- 三镜像从串行约25min → 并行约12min(预计)
- 变量覆盖service/service_display/dockerfile/image_name/cache_name/timeout
- 条件步骤正确:npm build仅web、Cleanup old images仅production web
2026-07-15 14:22:34 +08:00
CI Bot 90f834e03a fix: refresh schema-metadata-snapshot.json — add missing result_count column to edit_plans
CI/CD Pipeline / Build Staging Worker Image (push) Failing after 2s
CI/CD Pipeline / Build Staging API Image (push) Failing after 2s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 1m36s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1513h18m25s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1513h18m25s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1513h18m27s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1513h20m3s
CI/CD Pipeline / Deploy Production (push) Failing after 1513h20m3s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1513h20m5s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1513h20m5s
CI/CD Pipeline / Build Production API Image (push) Failing after 1513h20m5s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been skipped
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
The check_schema_metadata.py CI step was failing because the
edit_plans table gained a result_count column (INTEGER) in the
SQLAlchemy model but the snapshot was never updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 14:08:03 +08:00
XiaoXia Bot 33f08b465b fix: 补充edit_plans.result_count字段的Alembic迁移 (#366)
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
2026-07-15 14:07:57 +08:00
9 changed files with 597 additions and 789 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,29 @@
"""add result_count to edit_plans
Revision ID: 041_result_count
Revises: 040_playback_speed
Create Date: 2026-07-15 14:05:00.000000
"""
from __future__ import annotations
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "041_result_count"
down_revision = "040_playback_speed"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.add_column(
"edit_plans",
sa.Column("result_count", sa.Integer(), nullable=False, server_default="0"),
)
def downgrade() -> None:
op.drop_column("edit_plans", "result_count")
@@ -33,8 +33,9 @@ const formatSize = (bytes: number) => {
/** 格式化时长 */
const formatDuration = (seconds?: number) => {
if (!seconds) return "-";
const m = Math.floor(seconds / 60);
const s = seconds % 60;
const totalSec = Math.round(seconds);
const m = Math.floor(totalSec / 60);
const s = totalSec % 60;
return m > 0 ? `${m}分${s}秒` : `${s}秒`;
};
@@ -59,8 +59,9 @@ const formatSize = (bytes: number) => {
/** 格式化时长 */
const formatDuration = (seconds?: number) => {
if (!seconds) return "-";
const m = Math.floor(seconds / 60);
const s = seconds % 60;
const totalSec = Math.round(seconds);
const m = Math.floor(totalSec / 60);
const s = totalSec % 60;
return m > 0 ? `${m}分${s}秒` : `${s}秒`;
};
+3 -2
View File
@@ -86,8 +86,9 @@ const STATUS_CONFIG: Record<
/** 格式化时长 */
const formatDuration = (seconds: number): string => {
if (seconds <= 0) return "-";
const m = Math.floor(seconds / 60);
const s = seconds % 60;
const totalSec = Math.round(seconds);
const m = Math.floor(totalSec / 60);
const s = totalSec % 60;
if (m === 0) return `${s}秒`;
return `${m}分${s > 0 ? `${s}秒` : ""}`;
};
@@ -92,8 +92,9 @@ const gradientForCategory = (category: string): string => {
/** 格式化时长 */
const formatDuration = (seconds: number | undefined | null): string => {
if (!seconds || seconds <= 0) return "0秒";
const m = Math.floor(seconds / 60);
const s = seconds % 60;
const totalSec = Math.round(seconds);
const m = Math.floor(totalSec / 60);
const s = totalSec % 60;
if (m === 0) return `${s}秒`;
return `${m}分${s > 0 ? `${s}秒` : ""}`;
};
+8
View File
@@ -990,6 +990,14 @@
"type": "FLOAT",
"unique": false
},
{
"index": false,
"name": "result_count",
"nullable": false,
"primary_key": false,
"type": "INTEGER",
"unique": false
},
{
"index": false,
"name": "config",
+12
View File
@@ -60,6 +60,9 @@ fi
# 默认只读不写,防止 feature 分支污染主缓存
# 只有 develop/main 分支才写回缓存
BRANCH_NAME="${GITHUB_REF_NAME:-${CI_COMMIT_BRANCH:-unknown}}"
# 清理本地旧镜像
docker rmi -f "$API_IMAGE" "$API_LATEST" 2>/dev/null || true
if [ "$USE_CACHE" -eq 1 ]; then
docker buildx build \
--build-arg APP_VERSION="$VERSION" \
@@ -89,6 +92,9 @@ build_with_cache() {
echo " cache: read-only from ${CACHE_REGISTRY}/${IMG_NAME}-cache:${CACHE_TAG_PRIMARY}"
fi
# 清理本地旧镜像,避免 buildx --load 报 already exists 错误
docker rmi -f "$IMG_NAME:$VERSION" 2>/dev/null || true
if [ "$USE_CACHE" -eq 1 ]; then
if [ -n "$CACHE_TO" ]; then
docker buildx build \
@@ -119,6 +125,9 @@ build_with_cache "api" "infra/docker/api.Dockerfile" \
docker tag "$API_IMAGE" "$API_LATEST"
echo "=== Building Worker image ==="
# 清理本地旧镜像
docker rmi -f "$WORKER_IMAGE" "$WORKER_LATEST" 2>/dev/null || true
if [ "$USE_CACHE" -eq 1 ]; then
docker buildx build \
--build-arg APP_VERSION="$VERSION" \
@@ -148,6 +157,9 @@ docker run --rm \
test -f apps/web/dist/index.html
# 清理本地旧镜像
docker rmi -f "$WEB_IMAGE" 2>/dev/null || true
if [ "$USE_CACHE" -eq 1 ]; then
docker buildx build \
--cache-from "type=registry,ref=${CACHE_REGISTRY}/web-cache:${CACHE_TAG_PRIMARY},ignore-error=true" \