0
Fork 0
mirror of https://github.com/penpot/penpot-helm.git synced 2025-04-07 20:31:25 -05:00

chore: action to prevent PRs to main branch

This commit is contained in:
David Barragán Merino 2025-02-11 12:56:39 +01:00
parent 16dd0b7c55
commit 5e32e29171

View file

@ -0,0 +1,19 @@
name: Prevent external Pull Request to 'main' branch
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- edited
jobs:
check-branches:
runs-on: ubuntu-latest
steps:
- name: Check Pull Reques base and target branches
run: |
if [ ${{ github.head_ref }} != "develop" ] && [ ${{ github.base_ref }} == "main" ]; then
echo "Pull Requests to 'main' branch are only allowed from 'develop' branch."
echo "You can make your Pull Requests to 'develop'."
exit 1
fi