Skip to content

Commit bfa3128

Browse files
committed
ci: drop --depth=1 from submodule update to fix pinned commit fetch
Shallow clone (--depth=1) only fetches the latest commit of each branch. If the pinned submodule commit is not the HEAD of the default branch, git cannot resolve it and fails with 'not our ref'. Remove --depth=1 so the submodule is cloned fully.
1 parent f2bc02f commit bfa3128

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/build-matrix.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Checkout submodules
2020
run: |
2121
git config --global url."https://x-access-token:${{ secrets.MY_REPO_PAT }}@github.com/".insteadOf "git@github.com:"
22-
git submodule update --init --force --depth=1
22+
git submodule update --init --force
2323
2424
- name: Set matrix
2525
id: set-matrix
@@ -53,7 +53,7 @@ jobs:
5353
- name: Checkout submodules
5454
run: |
5555
git config --global url."https://x-access-token:${{ secrets.MY_REPO_PAT }}@github.com/".insteadOf "git@github.com:"
56-
git submodule update --init --force --depth=1
56+
git submodule update --init --force
5757
5858
- name: Set run variables
5959
id: set-variables

.github/workflows/nightly-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Checkout submodules
2525
run: |
2626
git config --global url."https://x-access-token:${{ secrets.MY_REPO_PAT }}@github.com/".insteadOf "git@github.com:"
27-
git submodule update --init --force --depth=1
27+
git submodule update --init --force
2828
2929
- name: Set matrix
3030
id: set-matrix
@@ -60,7 +60,7 @@ jobs:
6060
- name: Checkout submodules
6161
run: |
6262
git config --global url."https://x-access-token:${{ secrets.MY_REPO_PAT }}@github.com/".insteadOf "git@github.com:"
63-
git submodule update --init --force --depth=1
63+
git submodule update --init --force
6464
6565
- uses: ./ext/rusefi/.github/workflows/custom-board-build
6666
with:

.github/workflows/unit-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Checkout submodules
3030
run: |
3131
git config --global url."https://x-access-token:${{ secrets.MY_REPO_PAT }}@github.com/".insteadOf "git@github.com:"
32-
git submodule update --init --force --depth=1
32+
git submodule update --init --force
3333
3434
- name: Checkout rusefi submodules
3535
run: git -C ext/rusefi submodule update --init --force --depth=1

0 commit comments

Comments
 (0)