Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 15f0692

Browse files
committedMar 24, 2021
CI: deinit submodules before running actions/checkout
This action runs "git submodule foreach" early which will fail if a submodule has been deleted but is still present in the repo (see actions/checkout#354).
1 parent 4b32aeb commit 15f0692

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
 

‎.github/workflows/ci.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ jobs:
5252
- name: Set JDK 16 as default
5353
run: echo "/usr/lib/jvm/java-16-openjdk-amd64/bin" >> $GITHUB_PATH
5454

55+
- name: Cleanup submodules
56+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
57+
5558
- name: Checkout cleanup script
5659
uses: actions/checkout@v2
5760

@@ -97,6 +100,9 @@ jobs:
97100
- name: Set JDK 16 as default
98101
run: echo "/usr/lib/jvm/java-16-openjdk-amd64/bin" >> $GITHUB_PATH
99102

103+
- name: Cleanup submodules
104+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
105+
100106
- name: Checkout cleanup script
101107
uses: actions/checkout@v2
102108

@@ -190,6 +196,9 @@ jobs:
190196
)"
191197

192198
steps:
199+
- name: Cleanup submodules
200+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
201+
193202
- name: Checkout cleanup script
194203
uses: actions/checkout@v2
195204

@@ -230,6 +239,9 @@ jobs:
230239
)"
231240

232241
steps:
242+
- name: Cleanup submodules
243+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
244+
233245
- name: Checkout cleanup script
234246
uses: actions/checkout@v2
235247

@@ -270,6 +282,9 @@ jobs:
270282
)"
271283

272284
steps:
285+
- name: Cleanup submodules
286+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
287+
273288
- name: Checkout cleanup script
274289
uses: actions/checkout@v2
275290

@@ -310,6 +325,9 @@ jobs:
310325
)"
311326

312327
steps:
328+
- name: Cleanup submodules
329+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
330+
313331
- name: Checkout cleanup script
314332
uses: actions/checkout@v2
315333

@@ -358,6 +376,9 @@ jobs:
358376
- name: Set JDK 8 as default
359377
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
360378

379+
- name: Cleanup submodules
380+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
381+
361382
- name: Checkout cleanup script
362383
uses: actions/checkout@v2
363384

@@ -394,6 +415,9 @@ jobs:
394415
SONATYPE_USER: ${{ secrets.SONATYPE_USER_ORGSCALALANG }}
395416

396417
steps:
418+
- name: Cleanup submodules
419+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
420+
397421
- name: Checkout cleanup script
398422
uses: actions/checkout@v2
399423

@@ -428,6 +452,9 @@ jobs:
428452
# Make sure you have the write permissions to the repo: https://github.com/lampepfl/dotty-website
429453

430454
steps:
455+
- name: Cleanup submodules
456+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
457+
431458
- name: Checkout cleanup script
432459
uses: actions/checkout@v2
433460

@@ -474,6 +501,9 @@ jobs:
474501
SONATYPE_USER: ${{ secrets.SONATYPE_USER_ORGSCALALANG }}
475502

476503
steps:
504+
- name: Cleanup submodules
505+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
506+
477507
- name: Checkout cleanup script
478508
uses: actions/checkout@v2
479509

@@ -556,6 +586,9 @@ jobs:
556586
# Make sure you have the write permissions to the repo: https://github.com/lampepfl/dotty-website
557587

558588
steps:
589+
- name: Cleanup submodules
590+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
591+
559592
- name: Checkout cleanup script
560593
uses: actions/checkout@v2
561594

@@ -601,6 +634,9 @@ jobs:
601634
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
602635

603636
steps:
637+
- name: Cleanup submodules
638+
run: git reset --hard HEAD && git submodule sync && git submodule deinit -f . || true
639+
604640
- name: Checkout cleanup script
605641
uses: actions/checkout@v2
606642

0 commit comments

Comments
 (0)
Please sign in to comment.