fix(ci): 修复 build_release_images.sh 中 CACHE_TAG 未定义的问题 #297

Merged
xiaoxia merged 1 commits from fix/build-cache-tag into develop 2026-07-14 07:22:05 +08:00
Owner

问题

Build & Push Staging 失败,报错 CACHE_TAG: unbound variable(第64行附近)。

原因

脚本中 API/Worker/Web 的直接构建部分使用了 $CACHE_TAG 变量,但该变量未在 CI 环境中设置,且脚本开启了 set -eu

build_with_cache 函数中使用的是 CACHE_TAG_PRIMARY(有默认值 develop),属于变量名不一致的遗留问题。

修复

将 6 处直接使用 $CACHE_TAG 的地方统一改为 $CACHE_TAG_PRIMARY,与 build_with_cache 函数保持一致,默认值为 develop

## 问题 Build & Push Staging 失败,报错 `CACHE_TAG: unbound variable`(第64行附近)。 ## 原因 脚本中 API/Worker/Web 的直接构建部分使用了 `$CACHE_TAG` 变量,但该变量未在 CI 环境中设置,且脚本开启了 `set -eu`。 而 `build_with_cache` 函数中使用的是 `CACHE_TAG_PRIMARY`(有默认值 `develop`),属于变量名不一致的遗留问题。 ## 修复 将 6 处直接使用 `$CACHE_TAG` 的地方统一改为 `$CACHE_TAG_PRIMARY`,与 `build_with_cache` 函数保持一致,默认值为 `develop`。
xiaoxia added 1 commit 2026-07-14 07:17:22 +08:00
fix(ci): 修复 build_release_images.sh 中 CACHE_TAG 未定义的问题,统一使用 CACHE_TAG_PRIMARY
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 28s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 1m30s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m7s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m37s
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 28s
CI/CD Pipeline / Frontend Lint (push) Successful in 1m37s
e882667827
xiaoxia merged commit 9f86bd40ca into develop 2026-07-14 07:22:05 +08:00
Sign in to join this conversation.