Skip to content

Fixed Permissions. Generating, pruning and checking #23

Fixed Permissions. Generating, pruning and checking

Fixed Permissions. Generating, pruning and checking #23

name: Check branch hierarchy
on:
pull_request:
branches:
- main
jobs:
check-source-branch:
runs-on: ubuntu-latest
steps:
- name: Fail if a PR to main is not coming from dev
if: ${{ github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref != 'dev' }}
run: |
echo "This PR to 'main' is not coming from the 'dev' branch, fail"
exit 1 # Exit with non-zero status to make the check fail
- name: Pass if a PR to main is coming from dev
if: ${{ github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref == 'dev' }}
run: |
echo "This PR to 'main' is coming from the 'dev' branch, pass."