From 7dad08d1a9385a582ec9f457172086a8a0eb752f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=9F=B3=E6=9D=B0?= Date: Mon, 4 May 2026 17:42:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89actions/checkout?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=EF=BC=8C=E6=94=B9=E7=94=A8git=20clone?= =?UTF-8?q?=E9=81=BF=E5=85=8DGitHub=E7=BD=91=E7=BB=9C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/release-docs.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release-docs.yml b/.gitea/workflows/release-docs.yml index ab613cd..1742500 100644 --- a/.gitea/workflows/release-docs.yml +++ b/.gitea/workflows/release-docs.yml @@ -10,7 +10,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + run: | + git clone -b ${GITHUB_REF#refs/tags/} \ + "https://gitea-actions:${GITEA_TOKEN}@${{ github.server_url }}/${{ github.repository }}.git" . - name: Package docs run: | @@ -30,7 +34,7 @@ jobs: API="${{ github.server_url }}/api/v1/repos/${{ github.repository }}" AUTH="Authorization: token ${GITEA_TOKEN}" - # Delete existing release for this tag if any (ignore errors) + # Delete existing release for this tag if any EXISTING_ID=$(curl -sf "${API}/releases/tags/${TAG}" -H "$AUTH" 2>/dev/null \ | python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true) if [ -n "$EXISTING_ID" ]; then