From 95d64671c567735d52c5fff0991f9e4c918e0e9d Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Fri, 17 Jul 2026 16:21:13 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix(ci):=20ci-l1=E2=86=92ci-check=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=B0=83=E5=BA=A6=E6=AD=BB=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci-cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index b7ea51473..1301229f8 100755 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -24,7 +24,7 @@ concurrency: jobs: check-frontend-only: name: Check if frontend-only change - runs-on: ci-l1 + runs-on: ci-check if: github.event_name == 'pull_request' outputs: skip_backend: ${{ steps.check.outputs.skip_backend }} @@ -60,7 +60,7 @@ jobs: needs: check-frontend-only if: always() && needs.check-frontend-only.outputs.skip_backend != 'true' name: Validate Code Quality And Tests - runs-on: ci-l1 + runs-on: ci-check timeout-minutes: 10 env: DATABASE_URL: postgresql+psycopg://postgres:postgres@127.0.0.1:5432/xiaoxia_saas @@ -412,7 +412,7 @@ jobs: ' frontend-lint: name: Frontend Lint - runs-on: ci-l1 + runs-on: ci-check timeout-minutes: 10 steps: - name: Checkout code @@ -459,4 +459,4 @@ jobs: NOTIFY_MODE=failure JOB_NAME="Frontend Lint" python3 scripts/ci_notify.py - ' \ No newline at end of file + ' -- 2.54.0 From de05a3a11cb24dbeaae88b258ffbd9ce6266b890 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Fri, 17 Jul 2026 16:21:32 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix(ci):=20auto-approve=E7=94=A8head=20sha?= =?UTF-8?q?=E6=9F=A5=E7=8A=B6=E6=80=81+ci-check=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/auto-approve.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/auto-approve.yml b/.gitea/workflows/auto-approve.yml index 96d14a076..401d18b45 100644 --- a/.gitea/workflows/auto-approve.yml +++ b/.gitea/workflows/auto-approve.yml @@ -7,7 +7,7 @@ on: jobs: auto-approve: name: Auto Approve on CI Green - runs-on: ci-l1 + runs-on: ci-check if: github.event_name == 'pull_request' && !github.event.pull_request.draft timeout-minutes: 20 steps: @@ -20,6 +20,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} REVIEW_TOKEN: ${{ secrets.REVIEW_GITEA_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number }} + PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} run: | set -eu @@ -67,7 +68,7 @@ jobs: # 调用辅助脚本检查每个context状态 for ctx in "${CONTEXTS[@]}"; do - STATE=$(python3 scripts/check_ci_status.py "$GITHUB_TOKEN" "$GITHUB_REPOSITORY" "$GITHUB_SHA" "$ctx") + STATE=$(python3 scripts/check_ci_status.py "$GITHUB_TOKEN" "$GITHUB_REPOSITORY" "$PR_HEAD_SHA" "$ctx") echo " $ctx: $STATE" if [ "$STATE" != "success" ]; then -- 2.54.0 From bc0a42e3fcf9aaf741d04ee552e6a219598bdade Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Fri, 17 Jul 2026 16:21:50 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix(ci):=20auto-merge=E7=94=A8head=20sha?= =?UTF-8?q?=E6=9F=A5CI=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/auto-merge.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/auto-merge.yml b/.gitea/workflows/auto-merge.yml index bc0db30ee..d1998dec6 100644 --- a/.gitea/workflows/auto-merge.yml +++ b/.gitea/workflows/auto-merge.yml @@ -7,7 +7,7 @@ on: jobs: auto-merge: name: Auto Merge on CI Green + Approved - runs-on: ci-l1 + runs-on: ci-check if: github.event_name == 'pull_request' && !github.event.pull_request.draft && github.event.pull_request.base.ref == 'develop' timeout-minutes: 30 steps: @@ -20,6 +20,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} MERGE_TOKEN: ${{ secrets.REVIEW_GITEA_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number }} + PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} BASE_REF: ${{ github.event.pull_request.base.ref }} run: | set -eu @@ -65,7 +66,7 @@ jobs: # 检查CI状态 for ctx in "${CONTEXTS[@]}"; do - STATE=$(python3 scripts/check_ci_status.py "$GITHUB_TOKEN" "$GITHUB_REPOSITORY" "$GITHUB_SHA" "$ctx") + STATE=$(python3 scripts/check_ci_status.py "$GITHUB_TOKEN" "$GITHUB_REPOSITORY" "$PR_HEAD_SHA" "$ctx") echo " CI: ${ctx##*/}: $STATE" if [ "$STATE" != "success" ]; then ALL_SUCCESS=false -- 2.54.0 From 66b1add86e799c0d980426312932e21f8daa8ad6 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Fri, 17 Jul 2026 16:22:08 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix(ci):=20skipped=E5=92=8C=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=9A=84check=E8=A7=86=E4=B8=BA=E9=80=9A?= =?UTF-8?q?=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/check_ci_status.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/check_ci_status.py b/scripts/check_ci_status.py index cc159f9eb..d1f055b93 100644 --- a/scripts/check_ci_status.py +++ b/scripts/check_ci_status.py @@ -34,11 +34,18 @@ def main(): # API返回按时间倒序,第一个就是最新的 for s in statuses: if s.get("context") == target_context: - print(s.get("status", "pending")) + status = s.get("status", "pending") + # skipped 视为通过(条件跳过的任务不需要等) + if status == "skipped": + print("success") + else: + print(status) return - print("pending") + # 找不到这个context也视为通过(该workflow没触发=不需要检查) + print("success") if __name__ == "__main__": main() + -- 2.54.0 From 9cd50aec6eb08cbfe4fdeae95ab948ab6933b07c Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Fri, 17 Jul 2026 16:56:59 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix(ci):=20black=E6=A0=BC=E5=BC=8F=E5=8C=96?= =?UTF-8?q?check=5Fci=5Fstatus.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/check_ci_status.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/check_ci_status.py b/scripts/check_ci_status.py index d1f055b93..13b82ede0 100644 --- a/scripts/check_ci_status.py +++ b/scripts/check_ci_status.py @@ -48,4 +48,3 @@ def main(): if __name__ == "__main__": main() - -- 2.54.0