Allow release branches to target stable in target-branch-check (#9457)

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
This commit is contained in:
Lion - dapplion
2026-06-14 05:54:24 +02:00
committed by GitHub
parent 227a7c976f
commit 378f01670b

View File

@@ -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