Skip to content

merging 6090/6091/6092/6095/6096/6097/6068/6099/6100/6101/6104/6105/6106/6107/6108/6109/6110/6111/6112/6113/6114 to prod #4112

merging 6090/6091/6092/6095/6096/6097/6068/6099/6100/6101/6104/6105/6106/6107/6108/6109/6110/6111/6112/6113/6114 to prod

merging 6090/6091/6092/6095/6096/6097/6068/6099/6100/6101/6104/6105/6106/6107/6108/6109/6110/6111/6112/6113/6114 to prod #4112

name: Only allow staging -> prod & !prod -> staging merges
on:
pull_request:
branches:
- staging
- prod
jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Only allow staging -> prod merges
run: |
# All branches *except* prod can be merged into staging
# *Only* staging can be merged into prod
echo "Merging ${GITHUB_HEAD_REF} into ${GITHUB_BASE_REF}"
python3 -c 'import os, sys; sys.exit(not(os.environ["GITHUB_HEAD_REF"] == "staging" if os.environ["GITHUB_BASE_REF"] == "prod" else os.environ["GITHUB_HEAD_REF"] != "prod"))'