From b017e98eb9936fb0f3e12f24250bfaf2f7bc6ab9 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Wed, 3 Jul 2024 11:46:04 -0700 Subject: [PATCH] Add submodule pin check to CI This checks that submodules are ancestors of origin/HEAD so that non-merged branches aren't accidentally checked in. --- .github/workflows/submodule-pin-check.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/submodule-pin-check.yml diff --git a/.github/workflows/submodule-pin-check.yml b/.github/workflows/submodule-pin-check.yml new file mode 100644 index 0000000000..43984f1158 --- /dev/null +++ b/.github/workflows/submodule-pin-check.yml @@ -0,0 +1,15 @@ +name: Merge Checks + +on: + pull_request: + branches: [ master ] + types: [synchronize, opened, reopened, labeled, unlabeled] + +jobs: + submodule-pin-check: + name: Submodule Pin Check + runs-on: ubuntu-latest + steps: + - name: Check all submodules are under origin/HEAD + run: git submodule foreach git merge-base --is-ancestor HEAD origin/HEAD +