Skip to content

Merge pull request #6 from PiedTweet:hotfix/add-condition-to-main-branch #8

Merge pull request #6 from PiedTweet:hotfix/add-condition-to-main-branch

Merge pull request #6 from PiedTweet:hotfix/add-condition-to-main-branch #8

Workflow file for this run

name: Enforce branch rules
on:
pull_request:
branches:
- main
jobs:
check_branch_main:
runs-on: ubuntu-latest
steps:
- name: Check Branch main
run: |
if [[ "${{ github.head_ref }}" != "develop" && ! "${{ github.head_ref }}" =~ ^hotfix/ ]]; then
echo "ERROR: You can only merge to main from develop or hotfix/*."
exit 1
fi