Add target check for PR

This commit is contained in:
Alex Lion
2025-03-08 09:56:12 +01:00
parent 3f59f52dbf
commit 31e93d5774

16
.github/workflows/check-target.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
# .github/workflows/check-branches.yml
name: Check PR Source
on:
pull_request_target:
branches: [ "main", "dev" ]
jobs:
validate-branches:
runs-on: ubuntu-latest
steps:
- name: Check source branch
run: |
if [ "${{ github.event.pull_request.head.ref }}" != "dev" ]; then
echo "PRs to main must come from dev branch"
exit 1
fi