diff --git a/.github/workflows/branch-check-preprod.yml b/.github/workflows/branch-check-preprod.yml new file mode 100644 index 0000000..f743b6c --- /dev/null +++ b/.github/workflows/branch-check-preprod.yml @@ -0,0 +1,17 @@ +name: Restrict merges to preprod + +on: + pull_request: + branches: + - preprod + +jobs: + check-branch: + runs-on: ubuntu-latest + steps: + - name: Check if the source branch is develop + run: | + if [ "${{ github.event.pull_request.head.ref }}" != "develop" ]; then + echo "Pull requests to preprod must come from develop branch." + exit 1 + fi