mirror of
https://github.com/ClaperCo/Claper.git
synced 2025-12-16 20:07:59 +01:00
Add target check for PR
This commit is contained in:
16
.github/workflows/check-target.yml
vendored
Normal file
16
.github/workflows/check-target.yml
vendored
Normal 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
|
||||||
Reference in New Issue
Block a user