diff --git a/.github/workflows/development_merge_only.yaml b/.github/workflows/development_merge_only.yaml new file mode 100644 index 00000000..0e622eee --- /dev/null +++ b/.github/workflows/development_merge_only.yaml @@ -0,0 +1,21 @@ +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') \ No newline at end of file