Feat/add alternative impossible differential model #689
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: block-pr | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, edited] | |
branches: | |
- main | |
- develop | |
jobs: | |
block-pr-to-main-from-not-develop: | |
runs-on: ubuntu-latest | |
if: | |
( | |
github.event.pull_request.head.ref != 'develop' && | |
github.event.pull_request.base.ref == 'main' | |
) || | |
( | |
github.event.pull_request.head.ref == 'main' && | |
github.event.pull_request.base.ref == 'develop' | |
) | |
steps: | |
- name: Check branch name | |
run: | | |
if [ $GITHUB_HEAD_REF != "develop" ]; then | |
echo "Pull request not allowed from branch $GITHUB_HEAD_REF to main." | |
exit 1 | |
fi |