Enforce PR Source
This commit is contained in:
19
.github/workflows/enforce-pr-source.yml
vendored
Normal file
19
.github/workflows/enforce-pr-source.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Enforce PR Source
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
check-pr-source:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Enforce only staging → main
|
||||
run: |
|
||||
echo "head_ref: ${{ github.head_ref }}"
|
||||
echo "base_ref: ${{ github.base_ref }}"
|
||||
if [[ "${{ github.head_ref }}" != "staging" ]]; then
|
||||
echo "ERROR: Only 'staging' branch may create PRs into 'main'!"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user