From 46b94ebdad06c32a6175aa226329f9c061b6a401 Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 5 Jul 2026 17:27:45 +0000 Subject: [PATCH] Use Gitea clone token secret in workflow --- .gitea/workflows/android.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/android.yaml b/.gitea/workflows/android.yaml index 20974a9..0f5d40b 100644 --- a/.gitea/workflows/android.yaml +++ b/.gitea/workflows/android.yaml @@ -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"