diff --git a/.github/workflows/protect_releases.yml b/.github/workflows/protect_releases.yml new file mode 100644 index 00000000..cbd08e2f --- /dev/null +++ b/.github/workflows/protect_releases.yml @@ -0,0 +1,17 @@ +name: Restrict PR source + +on: + pull_request: + branches: + - dev + +jobs: + check-source-branch: + runs-on: ubuntu-latest + steps: + - name: Fail if PR is not from main + run: | + if [[ "${{ github.head_ref }}" != "main" ]]; then + echo "Only PRs from main are allowed into dev" + exit 1 + fi \ No newline at end of file