diff --git a/.github/workflows/enforce-pr-source.yml b/.github/workflows/enforce-pr-source.yml new file mode 100644 index 00000000..eec6cf73 --- /dev/null +++ b/.github/workflows/enforce-pr-source.yml @@ -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