mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 04:19:20 +00:00
ci: remove main branch protection rules (#5125)
This commit is contained in:
36
.github/workflows/branch-rules.yml
vendored
36
.github/workflows/branch-rules.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: Branch Rules
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- canary
|
||||
- 'v*-staging'
|
||||
|
||||
jobs:
|
||||
check-branch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Filter changed files
|
||||
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||
id: filter
|
||||
with:
|
||||
base: ${{ github.base_ref }}
|
||||
filters: |
|
||||
# 'src' filter matches any file NOT in the docs/ directory
|
||||
src:
|
||||
- '!docs/**'
|
||||
# 'docs' filter matches any file in the docs/ directory
|
||||
docs:
|
||||
- 'docs/**'
|
||||
|
||||
- name: Enforce code change PRs target canary or staging
|
||||
if: steps.filter.outputs.src == 'true' && github.base_ref != 'canary' && !startsWith(github.base_ref, 'v')
|
||||
run: |
|
||||
echo "Error: Pull requests with code changes must target 'canary' or a versioned staging branch (e.g., 'v1.2.3-staging')."
|
||||
exit 1
|
||||
18
.github/workflows/main-protect.yml
vendored
18
.github/workflows/main-protect.yml
vendored
@@ -1,18 +0,0 @@
|
||||
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