Add or update prevent-invalid-branch-merges workflow
This commit is contained in:
parent
6eb36d86a1
commit
0b37820510
|
|
@ -24,6 +24,7 @@ on:
|
|||
- dev_openeducat_erp-14.0.1.0
|
||||
- dev_odex25_ensan
|
||||
- dev_odex25_helpdesk
|
||||
- dev_odex25_donation
|
||||
|
||||
- preprod_odex-event
|
||||
- preprod_odex25_accounting
|
||||
|
|
@ -45,6 +46,7 @@ on:
|
|||
- preprod_openeducat_erp-14.0.1.0
|
||||
- preprod_odex25_ensan
|
||||
- preprod_odex25_helpdesk
|
||||
- preprod_odex25_donation
|
||||
|
||||
- master_odex-event
|
||||
- master_odex25_accounting
|
||||
|
|
@ -66,7 +68,7 @@ on:
|
|||
- master_openeducat_erp-14.0.1.0
|
||||
- master_odex25_ensan
|
||||
- master_odex25_helpdesk
|
||||
|
||||
- master_odex25_donation
|
||||
|
||||
|
||||
|
||||
|
|
@ -181,6 +183,11 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${{ github.base_ref }}" == "preprod_odex25_donation" && "${{ github.head_ref }}" != "dev_odex25_donation" ]]; then
|
||||
echo "::error ::You can only merge to 'preprod_odex25_donation' from 'dev_odex25_donation' branch!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ✅ Master Branches
|
||||
if [[ "${{ github.base_ref }}" == "master_odex-event" && "${{ github.head_ref }}" != "preprod_odex-event" ]]; then
|
||||
echo "::error ::You can only merge to 'master_odex-event' from 'preprod_odex-event' branch!"
|
||||
|
|
@ -282,6 +289,11 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${{ github.base_ref }}" == "master_odex25_donation" && "${{ github.head_ref }}" != "preprod_odex25_donation" ]]; then
|
||||
echo "::error ::You can only merge to 'master_odex25_donation' from 'preprod_odex25_donation' branch!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# ❌ Block ALL merges to 'master'
|
||||
if [[ "${{ github.base_ref }}" == "master" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue