From 1be22c7e8432cfe8aae9f02a3d22e3f25527149a Mon Sep 17 00:00:00 2001 From: Chummy Date: Tue, 24 Feb 2026 15:57:52 +0800 Subject: [PATCH] ci: allow release branches in main promotion gate --- .github/workflows/main-promotion-gate.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main-promotion-gate.yml b/.github/workflows/main-promotion-gate.yml index c607a11e8..d05e6bc00 100644 --- a/.github/workflows/main-promotion-gate.yml +++ b/.github/workflows/main-promotion-gate.yml @@ -43,12 +43,12 @@ jobs: fi if [[ "$HEAD_REPO" != "$BASE_REPO" ]]; then - echo "::error::PRs into main must originate from ${BASE_REPO}:dev. Current head repo: ${HEAD_REPO}." + echo "::error::PRs into main must originate from ${BASE_REPO}:dev or ${BASE_REPO}:release/*. Current head repo: ${HEAD_REPO}." exit 1 fi - if [[ "$HEAD_REF" != "dev" ]]; then - echo "::error::PRs into main must use head branch 'dev'. Current head branch: ${HEAD_REF}." + if [[ "$HEAD_REF" != "dev" && ! "$HEAD_REF" =~ ^release/ ]]; then + echo "::error::PRs into main must use head branch 'dev' or 'release/*'. Current head branch: ${HEAD_REF}." exit 1 fi