Files
better-auth/.github/workflows/main-protect.yml
T

19 lines
433 B
YAML

name: Main Branch Protection
on:
pull_request:
branches:
- main
jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
run: |
if [[ ${GITHUB_HEAD_REF} != canary ]] && ! [[ ${GITHUB_HEAD_REF} =~ ^v[0-9]+\.[0-9]+\.[0-9]+-staging$ ]];
then
echo "Error: Pull request must come from 'canary' or 'v*.*.*-staging' branch"
exit 1
fi