From a0fa32bdba2cccb09320fc70378e2461e36821d0 Mon Sep 17 00:00:00 2001 From: spdis Date: Wed, 18 Mar 2026 21:07:01 +0800 Subject: [PATCH] [0.2.7.4][ci] --- .gitea/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 54da5fd..f616c93 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -56,16 +56,16 @@ jobs: cd "$GITHUB_WORKSPACE" git init . - # 优先使用 secrets.token (USER_TOKEN) + # 优先使用 secrets.GITHUB_TOKEN (TOKEN) AUTH_TOKEN="$TOKEN" USE_BASIC_AUTH="false" - if [ -n "$USER_TOKEN" ]; then + if [ -n "$TOKEN" ]; then + echo "Using secrets.GITHUB_TOKEN for authentication (Bearer Header)." + elif [ -n "$USER_TOKEN" ]; then AUTH_TOKEN="$USER_TOKEN" USE_BASIC_AUTH="true" echo "Using secrets.token for authentication (Basic Auth)." - elif [ -n "$TOKEN" ]; then - echo "Using secrets.GITHUB_TOKEN for authentication (Bearer Header)." else echo "Warning: No token found. Attempting unauthenticated fetch (will fail for private repos)." fi