From 8e85d9e13fecd6e33bc53480104dce4132d8c725 Mon Sep 17 00:00:00 2001 From: Dorian Date: Mon, 4 Dec 2023 16:06:02 +0100 Subject: [PATCH] Fix rule --- ...y-allow-pull-requests-to-master-from-develop.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/only-allow-pull-requests-to-master-from-develop.yml b/.github/workflows/only-allow-pull-requests-to-master-from-develop.yml index e5730c5..a0ba9e8 100644 --- a/.github/workflows/only-allow-pull-requests-to-master-from-develop.yml +++ b/.github/workflows/only-allow-pull-requests-to-master-from-develop.yml @@ -6,17 +6,22 @@ on: jobs: bump-version: - name: Is pull request from develop + name: Is pull request from develop (or master) runs-on: ubuntu-latest #self-hosted steps: - - name: Check that pull request is from develop + - name: Check that pull request is from develop or master run: | if [ "${{github.head_ref}}" == "develop" ]; then - echo Pull request is from develop ✔ + echo Pull request is from develop ✔ + exit 0 + elif [ "${{github.head_ref}}" == "master" ]; then + echo Pull request is from master ✔ exit 0 else echo Pull requests from ${{github.head_ref}} are not allowed. Only pull requests from develop are allowed. - exit 1 fi + + exit 1 + \ No newline at end of file