Skip to content

Checking Pull Request to main branch #4

Checking Pull Request to main branch

Checking Pull Request to main branch #4

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