Skip to content

Commit

Permalink
feat: add workflow to restrict merges to master
Browse files Browse the repository at this point in the history
  • Loading branch information
NandyBa committed Dec 19, 2024
1 parent f81f456 commit 648f1ff
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/branch-check-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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

0 comments on commit 648f1ff

Please sign in to comment.