diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..be1185b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,17 @@ +name: Enforce PR Source Branch + +on: + pull_request: + branches: + - master + +jobs: + check_branch: + runs-on: ubuntu-latest + steps: + - name: Fail if PR is not from dev + run: | + if [[ "${{ github.head_ref }}" != "development" ]]; then + echo "Pull requests to main must come from the dev branch." + exit 1 + fi