fix: GHCR 镜像名必须小写(owner C3H3-AI 含大写导致 buildx 失败) - #4
Merged
Merged
Conversation
added 2 commits
September 15, 2026 13:42
Build Add-on Image 在合并后首次运行即失败:
##[error]Can't find 'action.yml', 'action.yaml' or 'Dockerfile'
for action 'home-assistant/builder/actions/prepare-multi-arch-matrix@7.2.0'.
根因:home-assistant/builder 存在两条版本线。
- 7.x(7.0 / 7.1 / 7.2.0):旧版 builder,**仓库内没有 actions/ 目录**
- 2026.x(2026.09.0 等):新版,含 actions/{build-image,
prepare-multi-arch-matrix,publish-multi-arch-manifest,cosign-verify}
实测对比(两个 tag 各自的 clone):
tag 7.2.0 → azure-pipelines.yml builder.sh build.json Dockerfile ...
actions/ 不存在
tag 2026.09.0 → actions/ action.yml ...(4 个子 action 齐全)
官方 README 示例中的 @[version] 指的是 releases 页面上的 tag,
即日历版本(2026.09.0),而非 7.x 那条线。此前取了 7.2.0 属实误判。
Build Add-on Image 第二次运行实际进入构建阶段,buildx 报错:
##[error]buildx failed with: ERROR: failed to build:
invalid tag "ghcr.io/C3H3-AI/amd64-ai-proxy:1.1.0b13":
repository name must be lowercase
根因:HA 官方 builder 的 prepare-multi-arch-matrix 与
publish-multi-arch-manifest 两个 action,其 registry-prefix 默认值均为
ghcr.io/${{ github.repository_owner }},而本仓库 owner 是 "C3H3-AI"(含大写)。
Docker/OCI 规范要求 repository name 必须全小写。
改动(3 处,统一为 ghcr.io/c3h3-ai):
- prepare-multi-arch-matrix: 显式传 registry-prefix
- publish-multi-arch-manifest: 显式传 registry-prefix
- verify job: 手写的 IMAGE 变量由 github.repository_owner 改为字面量
与 config.yaml 的 image: "ghcr.io/c3h3-ai/ai-proxy" 保持一致。
注:上一轮的 tag 引用修复(7.2.0 -> 2026.09.0)已生效——
本次 init job(Resolve version & matrix)全部步骤通过,
build job 也真正进入了 buildx 构建阶段,不再是 Set up job 失败。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description / 变更描述
修复
Build Add-on Image的第二次失败。上一轮 tag 引用修复已生效(init job 全部通过、build job 真正进入 buildx 阶段),本次是随之暴露的下一层问题。
失败现象
根因
HA 官方 builder 的两个 action,
registry-prefix默认值都是ghcr.io/${{ github.repository_owner }}:prepare-multi-arch-matrix(action.yml:14)publish-multi-arch-manifest(action.yml:32)而本仓库 owner 是
C3H3-AI(含大写)。Docker/OCI 规范要求repository name 必须全小写,故被 buildx 拒绝。
改动(3 处,统一为
ghcr.io/c3h3-ai)prepare-multi-arch-matrixregistry-prefixpublish-multi-arch-manifestregistry-prefixverifyjobIMAGE由github.repository_owner改为字面量与
config.yaml的image: "ghcr.io/c3h3-ai/ai-proxy"保持一致。验证进展
Set up job即失败(tag7.2.0无actions/目录)Type of change / 变更类型
Testing / 测试
三处 ghcr 前缀已本地核对一致,待合并后真机验证
Checklist / 自检清单