From 8778d641ab4c8b0f2295e0893a54db4e88ff8692 Mon Sep 17 00:00:00 2001 From: chendelian <116870791@qq.com> Date: Thu, 16 Apr 2026 13:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B5=81=E6=B0=B4=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/reusable-release-frontend.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-release-frontend.yaml b/.github/workflows/reusable-release-frontend.yaml index 808802a..d91e235 100644 --- a/.github/workflows/reusable-release-frontend.yaml +++ b/.github/workflows/reusable-release-frontend.yaml @@ -39,6 +39,9 @@ on: jobs: build-and-deploy: runs-on: ${{ inputs.runs_on }} + defaults: + run: + shell: bash env: NPM_CONFIG_REGISTRY: ${{ inputs.npm_registry }} steps: @@ -46,13 +49,16 @@ jobs: env: GITEA_HOST: git.jc2009.com GITEA_TOKEN: ${{ github.token }} + GITHUB_TOKEN: ${{ github.token }} run: | set -euo pipefail git config --global --add safe.directory '*' REPO="${{ github.repository }}" SHA="${{ github.sha }}" BRANCH="${{ github.ref_name }}" - URL="https://x-access-token:${GITEA_TOKEN}@${GITEA_HOST}/${REPO}.git" + TOKEN="${GITEA_TOKEN:-${GITHUB_TOKEN:-}}" + test -n "$TOKEN" || { echo "Checkout: empty token (github.token not available to this job)"; exit 1; } + URL="https://x-access-token:${TOKEN}@${GITEA_HOST}/${REPO}.git" WS="${GITHUB_WORKSPACE:-$(pwd)}" cd "$WS" shopt -s dotglob nullglob || true