From 378f01670b824544da9f3ee01486ebf2ff4bfc07 Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Sun, 14 Jun 2026 05:54:24 +0200 Subject: [PATCH] Allow release branches to target stable in target-branch-check (#9457) Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com> --- .github/workflows/test-suite.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 3db4804bd1..be0d0d5708 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -71,7 +71,15 @@ jobs: if: github.event_name == 'pull_request' || github.event_name == 'merge_group' steps: - name: Check that the pull request is not targeting the stable branch - run: test ${{ github.base_ref }} != "stable" + env: + BASE_REF: ${{ github.base_ref }} + HEAD_REF: ${{ github.head_ref }} + HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} + run: | + if [[ "$BASE_REF" == "stable" && ! ( "$HEAD_REF" == release-* && "$HEAD_REPO" == "sigp/lighthouse" ) ]]; then + echo "::error::Pull requests must target unstable, not stable (sigp/lighthouse release-* branches excepted)." + exit 1 + fi forbidden-files-check: name: forbidden-files-check