fix(ci): 修复 build_release_images.sh 中 CACHE_TAG 未定义的问题 #297
Reference in New Issue
Block a user
Delete Branch "fix/build-cache-tag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
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。