blob: 45ac0ade7bd02a86e81d7a07b2e214a2eeb49469 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
name: Check PR source branch
on:
pull_request_target:
types: [opened, synchronize]
jobs:
check-source-branch-is-not-main-or-master:
runs-on: ubuntu-latest
if: contains(fromJSON('["main", "master"]'), github.head_ref)
# or github.event.pull_request.head.ref
steps:
- run: |
echo "Error: Pull requests should not be from your 'main' or 'master' branch. :("
exit 1
|