[Release] Merge v0.1.0 stable release branch to main branch #3
Workflow file for this run
This file contains 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: 'Branch Protection to Main' | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
check-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Ensure PRs are only from allowed branches | |
run: | | |
if ! [[ ${GITHUB_HEAD_REF} =~ ^(release/|hotfix/).+ ]]; then | |
echo "Error: Pull requests to main can only be from 'release/*' or 'hotfix/*' branches." | |
exit 1 | |
fi |