From 66fefaa827bfdb9e39050afb1f8b412ce3145248 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Fri, 16 Aug 2024 22:30:56 +0200 Subject: [PATCH] chore: Add fail_pr_to_master.yaml --- .github/workflows/fail_pr_to_master.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/fail_pr_to_master.yaml diff --git a/.github/workflows/fail_pr_to_master.yaml b/.github/workflows/fail_pr_to_master.yaml new file mode 100644 index 000000000..53e1c652a --- /dev/null +++ b/.github/workflows/fail_pr_to_master.yaml @@ -0,0 +1,19 @@ +name: Fail PR to master + +on: + pull_request: + branches: + - master + +jobs: + fail_pr: + runs-on: ubuntu-latest + steps: + - name: Fail PR to master + run: | + if [[ "${{ github.event.pull_request.title }}" == "chore(dev): release"* ]]; then + echo "PR title starts with 'chore(dev): release', allowing PR" + else + echo "Pull requests to the master branch are not allowed, target dev branch" + exit 1 + fi