ci: don't run merge check on release branch + cleanup
This commit is contained in:
parent
62bfdf8636
commit
24f5bd4e3c
1 changed files with 2 additions and 7 deletions
|
@ -13,14 +13,9 @@ defaults:
|
|||
|
||||
jobs:
|
||||
check:
|
||||
name: Check if non-staging -> main
|
||||
runs-on: shell
|
||||
if: github.base_ref == 'main'
|
||||
if: github.base_ref == 'main' && !startsWith(github.ref, 'refs/heads/release/') && github.head_ref != 'staging'
|
||||
steps:
|
||||
- name: Check if non-staging -> main
|
||||
if: github.head_ref != 'staging'
|
||||
run: echo 'Cannot merge non-staging branch to main'; exit 1
|
||||
|
||||
- name: Check if staging -> main
|
||||
if: github.head_ref == 'staging'
|
||||
run: echo 'Merge from staging branch to main allowed'; exit 0
|
||||
|
||||
|
|
Loading…
Reference in a new issue