Files
better-auth/.github/workflows/branch-rules.yml
renovate[bot] bf264d5ebb chore(deps): update dorny/paths-filter action to v3.0.2 (#4506)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-08 16:49:30 -07:00

37 lines
1.1 KiB
YAML

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