Skip to content

Add eBPF host routing cluster to LSG validation pipeline #110

Add eBPF host routing cluster to LSG validation pipeline

Add eBPF host routing cluster to LSG validation pipeline #110

name: 'Merge Queue Enforcement'
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- master
- release/v[0-9]*.[0-9]*
merge_group:
types:
- checks_requested
permissions:
contents: read
jobs:
merge-queue-gate:
name: Merge Queue Gate
runs-on: ubuntu-latest
steps:
- name: Verify merge queue rule is active on target branch
if: github.event_name == 'pull_request'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: ${{ github.base_ref }}
run: |
if [[ ! "$BRANCH" =~ ^(master|release/v[0-9]+\.[0-9]+)$ ]]; then
echo "::error::Unexpected base branch name: '$BRANCH'. Expected 'master' or 'release/vX.Y'."
exit 1
fi
RULES=$(gh api "/repos/$REPO/rules/branches/$BRANCH" \
--jq '[.[] | select(.type == "merge_queue")] | length')
if [[ "$RULES" -eq 0 ]]; then
echo "::error::No active merge queue rule found for branch '$BRANCH'."
echo "A branch ruleset with the 'merge_queue' rule must be configured."
echo "Until this is fixed, direct merges into '$BRANCH' are possible."
exit 1
fi
echo "Merge queue rule is active on '$BRANCH' – check passed."
- name: Confirm merge queue context
if: github.event_name == 'merge_group'
run: echo "Running in merge queue context – check passed."