From 497039451fde624350c92532725f7cc97c686706 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 30 Sep 2025 20:15:29 +0800 Subject: [PATCH] ci(actions): accept secret 'giteatoken' as fallback for auto-merge --- .gitea/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9a36799..b69450e 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -32,12 +32,17 @@ jobs: steps: - name: Auto-merge PR on success env: + # Prefer GITEA_TOKEN; fall back to giteatoken if provided GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + GITEA_TOKEN_ALT: ${{ secrets.giteatoken }} PR_NUMBER: ${{ github.event.pull_request.number }} REPO: ${{ github.repository }} run: | + if [ -z "$GITEA_TOKEN" ] && [ -n "$GITEA_TOKEN_ALT" ]; then + GITEA_TOKEN="$GITEA_TOKEN_ALT" + fi if [ -z "$GITEA_TOKEN" ]; then - echo "GITEA_TOKEN not set, skipping auto-merge"; exit 0; + echo "No token found in secrets (GITEA_TOKEN or giteatoken). Skipping auto-merge."; exit 0; fi curl -sS -H "Authorization: token $GITEA_TOKEN" -H 'Content-Type: application/json' \ -X POST "http://localhost:3000/api/v1/repos/${REPO}/pulls/${PR_NUMBER}/merge" \