release: v1.3.0 — AI-Powered BYOK Features #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Target Check | |
| on: | |
| pull_request: | |
| branches: [production] | |
| jobs: | |
| check-source-branch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Only allow PRs from dev or release branches to production | |
| if: github.head_ref != 'dev' && !startsWith(github.head_ref, 'release/') | |
| run: | | |
| echo "::error::PRs targeting 'production' are only allowed from 'dev' or 'release/*' branches." | |
| echo "Please target 'dev' instead, or merge your branch into 'dev' first." | |
| echo "" | |
| echo " Source: ${{ github.head_ref }}" | |
| echo " Target: ${{ github.base_ref }}" | |
| exit 1 | |
| - name: PR source branch is valid | |
| if: github.head_ref == 'dev' || startsWith(github.head_ref, 'release/') | |
| run: echo "PR from '${{ github.head_ref }}' to 'production' — allowed." |