Merge pull request #53 from chingu-voyages/development #13
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: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
branches: | |
- main | |
- master | |
jobs: | |
check_branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check branch | |
if: github.base_ref == 'main' && github.head_ref != 'development' | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
core.setFailed('You can only push to main from development branch') |