ci: skip submodule update when no .gitmodules
This commit is contained in:
1 parent
9fc62cefa2
commit
be275abe22
1 file changed
+20
@@ -16,6 +16,10 @@ jobs:
|
|||||||
- name: Checkout submodules (retry)
|
- name: Checkout submodules (retry)
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
if [ ! -f .gitmodules ]; then
|
||||||
|
echo "No .gitmodules found; skipping submodule update."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
git submodule sync --recursive
|
git submodule sync --recursive
|
||||||
for attempt in 1 2 3 4 5; do
|
for attempt in 1 2 3 4 5; do
|
||||||
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
|
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
|
||||||
@@ -101,6 +105,10 @@ jobs:
|
|||||||
- name: Checkout submodules (retry)
|
- name: Checkout submodules (retry)
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
if [ ! -f .gitmodules ]; then
|
||||||
|
echo "No .gitmodules found; skipping submodule update."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
git submodule sync --recursive
|
git submodule sync --recursive
|
||||||
for attempt in 1 2 3 4 5; do
|
for attempt in 1 2 3 4 5; do
|
||||||
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
|
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
|
||||||
@@ -217,6 +225,10 @@ jobs:
|
|||||||
- name: Checkout submodules (retry)
|
- name: Checkout submodules (retry)
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
if [ ! -f .gitmodules ]; then
|
||||||
|
echo "No .gitmodules found; skipping submodule update."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
git submodule sync --recursive
|
git submodule sync --recursive
|
||||||
for attempt in 1 2 3 4 5; do
|
for attempt in 1 2 3 4 5; do
|
||||||
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
|
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
|
||||||
@@ -293,6 +305,10 @@ jobs:
|
|||||||
- name: Checkout submodules (retry)
|
- name: Checkout submodules (retry)
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
if [ ! -f .gitmodules ]; then
|
||||||
|
echo "No .gitmodules found; skipping submodule update."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
git submodule sync --recursive
|
git submodule sync --recursive
|
||||||
for attempt in 1 2 3 4 5; do
|
for attempt in 1 2 3 4 5; do
|
||||||
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
|
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
|
||||||
@@ -389,6 +405,10 @@ jobs:
|
|||||||
- name: Checkout submodules (retry)
|
- name: Checkout submodules (retry)
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
if [ ! -f .gitmodules ]; then
|
||||||
|
echo "No .gitmodules found; skipping submodule update."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
git submodule sync --recursive
|
git submodule sync --recursive
|
||||||
for attempt in 1 2 3 4 5; do
|
for attempt in 1 2 3 4 5; do
|
||||||
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
|
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
|
||||||
|
|||||||
Reference in new issue
Block a user