fix(ci): rename secret to REGISTRY_TOKEN (Gitea reserves GITEA_ prefix)
Build and Push Docker Image / build-and-push (push) Failing after 6m35s
Build and Push Docker Image / build-and-push (push) Failing after 6m35s
Gitea rejects secret names starting with GITEA_ (reserved for built-in secrets). Rename to REGISTRY_TOKEN in both the workflow and the README setup instructions, and add a comment noting the constraint. Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
This commit is contained in:
@@ -40,9 +40,10 @@ jobs:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
# 使用触发用户作为镜像 owner;token 需在仓库 Secrets 里配置
|
||||
# 推荐做法:到 Gitea「用户设置 → 应用 → 生成 Access Token」
|
||||
# 勾选 write:package 权限,将值存为仓库 Secret 名为 GITEA_TOKEN
|
||||
# 勾选 write:package 权限,将值存为仓库 Secret 名为 REGISTRY_TOKEN
|
||||
# 注意:Gitea 保留 GITEA_ 前缀,secret 不能以 GITEA_ 开头
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.GITEA_TOKEN }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Compute image tags & labels
|
||||
id: meta
|
||||
|
||||
@@ -290,7 +290,7 @@ intents:
|
||||
|
||||
1. **注册 Gitea Actions Runner**(如未注册):在仓库 → Settings → Actions → Runners 获取注册命令
|
||||
2. **创建 Access Token**:用户头像 → Settings → Applications → Generate Token,勾选 `write:package`
|
||||
3. **在仓库 Secrets 添加**:仓库 Settings → Actions → Secrets → 新增名为 `GITEA_TOKEN`,值为上一步生成的 token
|
||||
3. **在仓库 Secrets 添加**:仓库 Settings → Actions → Secrets → 新增名为 `REGISTRY_TOKEN`,值为上一步生成的 token
|
||||
4. **打开镜像仓库**:Gitea 默认启用 Packages,无需额外操作;首次 push 后会自动在 `Packages` 里出现
|
||||
|
||||
### 拉取镜像示例
|
||||
|
||||
Reference in New Issue
Block a user