Use Gitea clone token secret in workflow
Some checks failed
Gitea Android APK / probe (push) Successful in 0s
Gitea Android APK / checkout (push) Failing after 0s
Gitea Android APK / build (push) Failing after 0s
Gitea Smoke / smoke (push) Successful in 0s

This commit is contained in:
Codex 2026-07-05 17:27:45 +00:00
parent 72780eb98f
commit 46b94ebdad

View File

@ -19,6 +19,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Test repository checkout
env:
CLONE_TOKEN: ${{ secrets.TMUX_GITEA_TOKEN }}
run: |
set -eu
if ! command -v git >/dev/null 2>&1 || ! command -v curl >/dev/null 2>&1 || ! command -v unzip >/dev/null 2>&1; then
@ -36,7 +38,7 @@ jobs:
mkdir -p "${WORKDIR}"
SERVER_URL="${GITHUB_SERVER_URL:-https://gitea.neatcn.com}"
REPOSITORY="${GITHUB_REPOSITORY:-tmux/tmux-browser-android}"
TOKEN="${GITHUB_TOKEN:-${GITEA_TOKEN:-}}"
TOKEN="${CLONE_TOKEN:-${GITHUB_TOKEN:-${GITEA_TOKEN:-}}}"
if [ -n "${TOKEN}" ]; then
AUTH_SERVER_URL="$(printf '%s' "${SERVER_URL}" | sed "s#https://#https://x-access-token:${TOKEN}@#")"
REPO_URL="${AUTH_SERVER_URL}/${REPOSITORY}.git"
@ -52,6 +54,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Build APK without external actions
env:
CLONE_TOKEN: ${{ secrets.TMUX_GITEA_TOKEN }}
run: |
set -eu
@ -71,7 +75,7 @@ jobs:
mkdir -p "${WORKDIR}"
SERVER_URL="${GITHUB_SERVER_URL:-https://gitea.neatcn.com}"
REPOSITORY="${GITHUB_REPOSITORY:-tmux/tmux-browser-android}"
TOKEN="${GITHUB_TOKEN:-${GITEA_TOKEN:-}}"
TOKEN="${CLONE_TOKEN:-${GITHUB_TOKEN:-${GITEA_TOKEN:-}}}"
if [ -n "${TOKEN}" ]; then
AUTH_SERVER_URL="$(printf '%s' "${SERVER_URL}" | sed "s#https://#https://x-access-token:${TOKEN}@#")"
REPO_URL="${AUTH_SERVER_URL}/${REPOSITORY}.git"