From 70f80355daf89e3ec8e0a7fb9ce6c95f5b1d77be Mon Sep 17 00:00:00 2001 From: zhilv Date: Tue, 26 May 2026 13:16:40 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(workflow):=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20Release=20Token=20=E9=A2=84=E6=A3=80=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在发布步骤前输出 RELEASE_TOKEN 长度,避免空值或旧值问题继续被误判 - 使用当前 token 预检 /api/v1/user 和 releases 列表接口状态码 - 为后续定位 workflow 与本地手工调用结果不一致的问题提供直接证据 --- .gitea/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 0d21804..04b69cb 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -135,6 +135,15 @@ jobs: GITEA_URL="${SERVER_URL%/}" GITEA_OWNER="${REPOSITORY%%/*}" GITEA_REPO="${REPOSITORY#*/}" + echo "RELEASE_TOKEN length: $(printf '%s' "${GITEA_TOKEN:-}" | wc -c)" + curl -sS -o /tmp/lightops-user.json -w 'user status: %{http_code}\n' \ + -H "Authorization: token ${GITEA_TOKEN}" \ + "${GITEA_URL}/api/v1/user" + cat /tmp/lightops-user.json + curl -sS -o /tmp/lightops-release-list.json -w 'release list status: %{http_code}\n' \ + -H "Authorization: token ${GITEA_TOKEN}" \ + "${GITEA_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases" + cat /tmp/lightops-release-list.json cd lightops-src TAG="$(cat /tmp/lightops-release-tag)" TARGET_SHA="$(git rev-parse HEAD)"