mirror of
https://github.com/SwingTheVine/Wplace-BlueMarble.git
synced 2026-04-20 22:42:03 +00:00
20 lines
526 B
YAML
20 lines
526 B
YAML
name: Enforce allowed branches for PRs to main
|
|
|
|
permissions:
|
|
contents: read
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
check-branch:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check PR source branch
|
|
run: |
|
|
echo "Source branch: ${{ github.head_ref }}"
|
|
if [[ "${{ github.head_ref }}" != "documentation" && "${{ github.head_ref }}" != "code" ]]; then
|
|
echo "Error: PRs to main must come from 'documentation' or 'code' branches only."
|
|
exit 1
|
|
fi
|