Release 4/19/2024 #12
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: Check Branch | |
on: pull_request | |
jobs: | |
check_branch: | |
name: Check base and head branches | |
runs-on: ubuntu-latest | |
steps: | |
- name: dev into main | |
if: ${{ github.base_ref == 'main' && github.head_ref == 'dev' }} | |
run: echo "Your pull request is for dev into main." && exit 0 | |
- name: feature branch into dev | |
if: ${{ github.base_ref == 'dev' }} | |
run: echo "TESTING Your pull request is for a feature branch into dev." && exit 0 | |
- name: non dev branch into main | |
if: ${{ github.base_ref == 'main' && github.head_ref != 'dev' }} | |
run: | | |
echo "ERROR: You can only merge the dev branch into main." && exit 1 |