Skip to content

Commit

Permalink
Add submodule pin check to CI
Browse files Browse the repository at this point in the history
This checks that submodules are ancestors of origin/HEAD so that
non-merged branches aren't accidentally checked in.
  • Loading branch information
Tristan-Wilson committed Jul 3, 2024
1 parent dc84707 commit b017e98
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/submodule-pin-check.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b017e98

Please sign in to comment.