mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 12:27:44 +00:00
ci: main branch protection (#4443)
This commit is contained in:
18
.github/workflows/main-protect.yml
vendored
Normal file
18
.github/workflows/main-protect.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
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
|
||||||
Reference in New Issue
Block a user