gha: Add workflow to check that PRs target trunk
diff --git a/.github/workflows/pr_branch_check.yml b/.github/workflows/pr_branch_check.yml
new file mode 100644
index 00000000..87e61ca9
--- /dev/null
+++ b/.github/workflows/pr_branch_check.yml
@@ -0,0 +1,15 @@
+name: Check that the PR is targetting trunk
+
+on: [ pull_request ]
+
+jobs:
+ pr_branch_check:
+ name: Check that the PR is targetting trunk
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check that the PR is targetting trunk
+ if: ${{ github.base_ref != 'trunk' }}
+ run: |
+ set -e
+ echo "The PR is not targetting the trunk branch, please fix that."
+ false
