:: commit 3a42f558ff6395c78476f9268a9b86fbab602799

Mintsuki <mintsuki@protonmail.com> — 2025-03-15 15:52

parents: 2700f94006

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
tab: 248 wrap: offon