From 49fd8598e7796866e84f98c80c68cf8771a830a7 Mon Sep 17 00:00:00 2001 From: Jacky Date: Mon, 28 Sep 2026 22:58:29 +0800 Subject: [PATCH] ci: use authenticated Gitea checkout --- .gitea/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 976e122..a529418 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -26,10 +26,14 @@ jobs: steps: - name: Checkout repository env: - REPOSITORY_URL: http://117.72.28.96:8765/Jacky/Hulumath-Web.git + CHECKOUT_TOKEN: ${{ github.token }} REVISION: ${{ gitea.sha }} run: | - git clone "$REPOSITORY_URL" . + set -euo pipefail + git init . + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + git -c http.extraHeader="Authorization: token ${CHECKOUT_TOKEN}" \ + fetch --depth=1 origin "$REVISION" git checkout --detach "$REVISION" - name: Show Python version run: python3 --version