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