Add more global info sessions (staging>main) #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Main Branch Protection | |
# yamllint disable-line rule:truthy | |
on: | |
pull_request: | |
branches: | |
- main | |
permissions: read-all | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
protect-main-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check branch | |
run: | | |
if [[ ${GITHUB_HEAD_REF} != staging ]] ; then | |
echo "Error: Pull requests to 'main' must come from 'staging'" | |
exit 1 | |
fi |