From b45d21100aee1dff31da7fecb10c32c9baba451b Mon Sep 17 00:00:00 2001 From: huty Date: Thu, 23 Apr 2026 00:50:25 +0900 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E5=B0=86=20Secret=20=E5=90=8D?= =?UTF-8?q?=E4=BB=8E=20GITEA=5FTOKEN=20=E6=94=B9=E4=B8=BA=20REGISTRY=5FTOK?= =?UTF-8?q?EN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gitea 明确禁止使用 GITEA_ 和 GITHUB_ 前缀的 Secret 名称, 将两个工作流中的密码引用统一改为 REGISTRY_TOKEN。 Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/ci.yml | 5 +++-- .gitea/workflows/release.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 6c4a433..1611048 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -7,7 +7,8 @@ # develop → :develop + :sha-<短提交号> # # 前置配置(Gitea → 仓库 → 设置 → Secrets): -# GITEA_TOKEN — 具有 package:write 权限的 Gitea Access Token +# REGISTRY_TOKEN — 具有 package:write 权限的 Gitea Access Token +# (注意:Gitea 禁止使用 GITEA_ / GITHUB_ 前缀的 Secret 名称) # ═══════════════════════════════════════════════════════════════ name: CI — Docker Build & Push @@ -58,7 +59,7 @@ jobs: with: registry: ${{ env.REGISTRY }} username: ${{ gitea.actor }} - password: ${{ secrets.GITEA_TOKEN }} + password: ${{ secrets.REGISTRY_TOKEN }} # ── 6. 提取镜像元数据(自动生成 tags 和 labels)───────── - name: 提取镜像元数据 diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index cf6b151..16aa863 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -6,7 +6,8 @@ # v1.2.3 → :1.2.3 + :1.2 + :1 + :latest # # 前置配置(Gitea → 仓库 → 设置 → Secrets): -# GITEA_TOKEN — 具有 package:write 权限的 Gitea Access Token +# REGISTRY_TOKEN — 具有 package:write 权限的 Gitea Access Token +# (注意:Gitea 禁止使用 GITEA_ / GITHUB_ 前缀的 Secret 名称) # ═══════════════════════════════════════════════════════════════ name: Release — Docker Build & Push @@ -62,7 +63,7 @@ jobs: with: registry: ${{ env.REGISTRY }} username: ${{ gitea.actor }} - password: ${{ secrets.GITEA_TOKEN }} + password: ${{ secrets.REGISTRY_TOKEN }} # ── 6. 提取镜像元数据 ──────────────────────────────────── # metadata-action 对 semver tag 会自动生成多级标签: