diff --git a/.github/workflows/check_pr_branch.yml b/.github/workflows/check_pr_branch.yml index 5d12a9303d..19e67f46e3 100644 --- a/.github/workflows/check_pr_branch.yml +++ b/.github/workflows/check_pr_branch.yml @@ -1,13 +1,13 @@ name: check PR branch -on: - pull_request: - branches: - - main - +on: [pull_request] jobs: check-PR-branch: runs-on: ubuntu-latest steps: - name: PRs should not target main - run: exit 1 + run: | + if [[ "${{ github.base_ref }}" == "main" ]]; then + echo "Pull requests must not be made against main. Please target development instead." + exit 1 + fi