mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
179abfca1a
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
16 lines
473 B
YAML
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
|