Skip to content

Enhancment/122 update citation event #168

Enhancment/122 update citation event

Enhancment/122 update citation event #168

name: Main Branch Protection
on:
pull_request:
branches:
- main
- dev
jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Check source branch
run: |
if [[ "${GITHUB_BASE_REF}" == "main" ]]; then
if [[ "${GITHUB_HEAD_REF}" != "dev" ]] && [[ "${GITHUB_HEAD_REF}" != hotfix/* ]]; then
echo "Error: Pull requests to main must come from the 'dev' or a 'hotfix/*' branch (got '${GITHUB_HEAD_REF}')"
exit 1
fi
fi