Test To Main 2026-04-24 #18
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: Main - Branch Protection | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| check-main-branch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check branch | |
| run: | | |
| if [[ ${GITHUB_HEAD_REF} != 'test' ]] && ! [[ ${GITHUB_HEAD_REF} =~ ^hotfix/ ]]; then | |
| echo "" | |
| echo "Error: Pull Request into main must come from a merged 'test' or 'hotfix/*' source branch" | |
| echo "Fix: Rename the source branch to hotfix/* or close this PR and target a different base using a new PR." | |
| exit 1 | |
| fi |