discourse/.github/workflows/check-branches.yml
Blake Erickson 179abfca1a
DEV: Update gh workflow check-branches.yml (#24298)
Without this change the resulting comparison looks like

```
if [ tests-passed == "tests-passed" ]; then
```

and so it was always failing. This way the resulting base branch name will also be in quotes for the comparison.

Follow up to: #24273
2023-11-08 11:56:49 -07:00

16 lines
473 B
YAML

name: PR base branch check
on:
pull_request:
jobs:
check-branches:
if: github.event_name == 'pull_request' && github.repository == 'discourse/discourse-private-mirror'
runs-on: ubuntu-latest
steps:
- name: Check branches
run: |
BASE_REF=${{ github.base_ref }}
if [ "$BASE_REF" == "tests-passed" ]; then
echo "PR requests to tests-passed branch are not allowed. Please use main."
exit 1
fi