Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/block-main-non-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Block main merges from non-release branches

on:
pull_request:
types: [opened, reopened, synchronize, edited]
branches: [main]

jobs:
enforce:
runs-on: ubuntu-latest
steps:
- name: Ensure PR comes from release/*
run: |
echo "Base: ${{ github.base_ref }}"
echo "Head: ${{ github.head_ref }}"
if [[ "${{ github.head_ref }}" != release/* ]]; then
echo "::error::PRs to main are only allowed from release/* branches."
exit 1
fi
Loading