diff --git a/.github/workflows/enforce-branch-policy.yml b/.github/workflows/enforce-branch-policy.yml index 60e500525..8b84b0ca1 100644 --- a/.github/workflows/enforce-branch-policy.yml +++ b/.github/workflows/enforce-branch-policy.yml @@ -1,16 +1,19 @@ -name: Run Tests +name: Enforce Branch Policy on: - push: - branches: - - main pull_request: workflow_dispatch: jobs: enforce-branch-policy: runs-on: ubuntu-latest steps: - - name: Enforce branch policy + - name: Enforce main branch policy + if: github.ref == 'refs/heads/main' run: | echo "Pull requests to the main branch are not allowed." - exit 1 \ No newline at end of file + exit 1 + - name: Enforce develop branch policy + if: github.ref != 'refs/heads/main' + run: | + echo "Pull requests to the develop branch are allowed." + exit 0 \ No newline at end of file