diff --git a/.github/workflows/prevent-wrong-pr.yml b/.github/workflows/prevent-wrong-pr.yml index c2073db3..1cbfebf3 100644 --- a/.github/workflows/prevent-wrong-pr.yml +++ b/.github/workflows/prevent-wrong-pr.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Prevent dev merges run: | - if [[ "${{ github.head_ref }}" == "dev" ]]; then + if [[ "${{ github.head_ref }}" == "dev" && "${{ github.base_ref }}" == "main" ]]; then echo "ERROR: Merging 'dev' into '${{ github.base_ref }}' is forbidden!" exit 1 fi