Skip to content

Commit

Permalink
feat: add workflow to restrict merges to master (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
NandyBa authored Dec 21, 2024
1 parent f81f456 commit db54874
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 db54874

Please sign in to comment.