From 2a7201a2a4cebce0b74efe80afd894ab59ee9348 Mon Sep 17 00:00:00 2001 From: Xiaoxia AI Date: Mon, 15 Jun 2026 19:59:47 +0800 Subject: [PATCH] fix: set gitea checkout base url --- .gitea/workflows/deploy.yml | 4 ++++ .gitea/workflows/tests.yml | 4 ++++ docs/CI-CD.md | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index c562bfcc7..160496bc1 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -15,6 +15,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + github-server-url: https://api.xiaoxiajianji.com/git - name: Sync code to staging workspace run: | @@ -68,6 +70,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + github-server-url: https://api.xiaoxiajianji.com/git - name: Sync code to production workspace run: | diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 6164f415a..fc52e0657 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -13,6 +13,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + github-server-url: https://api.xiaoxiajianji.com/git - name: Set up Python uses: actions/setup-python@v4 @@ -41,6 +43,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + github-server-url: https://api.xiaoxiajianji.com/git - name: Set up Python uses: actions/setup-python@v4 diff --git a/docs/CI-CD.md b/docs/CI-CD.md index 57b94640e..0e2deeb34 100644 --- a/docs/CI-CD.md +++ b/docs/CI-CD.md @@ -80,7 +80,7 @@ mypy packages/ apps/ --ignore-missing-imports ## 故障排查 ### Actions 触发了但 checkout 失败 -优先检查 runner 能否从 job 容器访问 Gitea 实例地址。 +优先检查 runner 能否从 job 容器访问 Gitea 实例地址;如果 Gitea 挂在 `/git` 这类子路径下,需要给 `actions/checkout` 显式传 `github-server-url`。 ### Deploy 成功但业务链不通 优先检查: