mirror of
https://github.com/mayanayza/netvisor.git
synced 2025-12-10 08:24:08 -06:00
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
19 lines
531 B
YAML
19 lines
531 B
YAML
name: Check pull request source branch
|
|
on:
|
|
pull_request_target:
|
|
types: [opened, reopened, synchronize, edited]
|
|
jobs:
|
|
check-branches:
|
|
name: pr_dev_only
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check branches
|
|
env:
|
|
HEAD_REF: ${{ github.head_ref }}
|
|
BASE_REF: ${{ github.base_ref }}
|
|
run: |
|
|
if [ "$HEAD_REF" != "dev" ] && [ "$BASE_REF" = "main" ]; then
|
|
echo "Merge requests to main branch are only allowed from dev branch."
|
|
exit 1
|
|
fi
|