1
0
forked from Eeveid/lightOps

🔧 chore(workflow): 增加 Release Token 预检日志

- 在发布步骤前输出 RELEASE_TOKEN 长度,避免空值或旧值问题继续被误判
- 使用当前 token 预检 /api/v1/user 和 releases 列表接口状态码
- 为后续定位 workflow 与本地手工调用结果不一致的问题提供直接证据
This commit is contained in:
2026-05-26 13:16:40 +08:00
parent abcfcf7b33
commit 70f80355da

View File

@@ -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)"