Checking Pull Request to main branch #4
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: Check Pull Request to main | |
run-name: Checking Pull Request to main branch | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- edited | |
branches: | |
- "main" | |
jobs: | |
check-pull-request-to-main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking Pull Request | |
if: github.base_ref == 'main' && startsWith( github.head_ref, 'release/' ) | |
run: | | |
echo "ERROR: You can only merge to main branch from release branches." | |
exit 1 |