Merge remote-tracking branch 'origin/pj/add-ci-checks' into staging

This commit is contained in:
Lance R. Vick 2024-08-17 13:03:54 -07:00
commit 2da2ee66a5
No known key found for this signature in database
GPG key ID: 8E47A1EC35A1551D

View file

@ -0,0 +1,26 @@
name: merge-main-check
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
defaults:
run:
shell: 'sh -e {0}'
jobs:
check:
runs-on: shell
if: github.base_ref == 'main'
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