feat: add workflow to restrict merges to master #1
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: Restrict merges to master | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
check-branch-master: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if the source branch is preprod | |
run: | | |
if [ "${{ github.event.pull_request.head.ref }}" != "preprod" ]; then | |
echo "Pull requests to master must come from preprod branch." | |
exit 1 | |
fi |