Skip to content

Workflow test

Workflow test #4

Workflow file for this run

name: Source branch check
on:
pull_request:
branches: [main]
pull_request_target:
types:
- opened
- reopened
- synchronize
- edited
jobs:
check-branches:
runs-on: ubuntu-latest
steps:
- name: Check branches
run: |
if [ ${{ github.head_ref }} != "staging" ] && [ ${{ github.base_ref }} == "main" ]; then
echo "Merge requests to main branch are only allowed from staging branch."
exit 1
fi