Skip to content

Add CI test that fails if a PR is issued to main #8

Add CI test that fails if a PR is issued to main

Add CI test that fails if a PR is issued to main #8

Workflow file for this run

name: check PR branch
on: [pull_request]
jobs:
check-PR-branch:
runs-on: ubuntu-latest
steps:
- name: PRs should not target main
run: |

Check failure on line 9 in .github/workflows/check_pr_branch.yml

View workflow run for this annotation

GitHub Actions / check PR branch

Invalid workflow file

The workflow is not valid. .github/workflows/check_pr_branch.yml (Line: 9, Col: 14): Unrecognized named-value: 'git'. Located at position 1 within expression: git rev-parse main
if [[ "${{ github.event.pull_request_target.head.sha }}" == "${{ git rev-parse main }}" ]]; then
echo "Pull requests must not be made against main. Please target development instead."
exit 1
fi