fix(ci): 修复matrix并发构建时buildx builder命名冲突 #434
Reference in New Issue
Block a user
Delete Branch "fix/buildx-builder-name-conflict"
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?
问题
三个matrix job(API/Web/Worker)共用
GITHUB_JOB名称(都是build-staging),并发运行时争抢同一个buildx builder实例,导致后启动的2个job报existing instance ... but no append mode错误失败。修复
在buildx builder名称中加入
matrix.cache_name维度,确保每个matrix job有独立的builder实例:ci-builder-${GITHUB_RUN_ID}-${GITHUB_JOB}ci-builder-${GITHUB_RUN_ID}-${GITHUB_JOB}-${{ matrix.cache_name }}影响范围:staging构建 + production构建,共2处,每处3个引用(inspect/create/use)。