Skip to content

Commit b2dc0d6

Browse files
authored
[CI] Detect unpinned git submodules in GH PR checks (#5627)
1 parent 1b7ef72 commit b2dc0d6

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/check-links.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,22 @@ jobs:
3131
cache: npm
3232
cache-dependency-path: tmp/package-ci.json
3333

34-
- run: npm install --omit=optional
34+
- run: |
35+
npm install --omit=optional
36+
git restore package.json
37+
38+
- name: Git submodules properly pinned?
39+
run: |
40+
npm run seq pin:submodule
41+
echo "If the diff check below fails, then update .gitmodules by pinning the named git"
42+
echo "submodule(s); or undo the submodule update(s) if it happened by mistake."
43+
npm run _diff:fail
44+
3545
- run: npm run log:check:links
3646
continue-on-error: true
3747
- name: Any files need updating?
3848
run: |
39-
git restore package.json
40-
echo "If the following fails, then either run 'npm run fix:htmltest-config' locally or '/fix:htmltest-config' in GitHub"
49+
echo "If the diff fails due to .htmltest, then either run 'npm run fix:htmltest-config' locally or '/fix:htmltest-config' in GitHub"
4150
npm run _diff:fail
4251
- uses: actions/upload-artifact@v4
4352
with:

0 commit comments

Comments
 (0)