ci: skip submodule update when no .gitmodules

This commit is contained in:
ThanhNguyxn committed 2026-01-30 22:56:50 +07:00
1 parent 59f6fc3748
commit 37e43c8f7f
1 file changed
+20
+20
View File
@@ -16,6 +16,10 @@ jobs:
- name: Checkout submodules (retry)
run: |
set -euo pipefail
if [ ! -f .gitmodules ]; then
echo "No .gitmodules found; skipping submodule update."
exit 0
fi
git submodule sync --recursive
for attempt in 1 2 3 4 5; do
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
@@ -101,6 +105,10 @@ jobs:
- name: Checkout submodules (retry)
run: |
set -euo pipefail
if [ ! -f .gitmodules ]; then
echo "No .gitmodules found; skipping submodule update."
exit 0
fi
git submodule sync --recursive
for attempt in 1 2 3 4 5; do
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
@@ -217,6 +225,10 @@ jobs:
- name: Checkout submodules (retry)
run: |
set -euo pipefail
if [ ! -f .gitmodules ]; then
echo "No .gitmodules found; skipping submodule update."
exit 0
fi
git submodule sync --recursive
for attempt in 1 2 3 4 5; do
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
@@ -293,6 +305,10 @@ jobs:
- name: Checkout submodules (retry)
run: |
set -euo pipefail
if [ ! -f .gitmodules ]; then
echo "No .gitmodules found; skipping submodule update."
exit 0
fi
git submodule sync --recursive
for attempt in 1 2 3 4 5; do
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
@@ -389,6 +405,10 @@ jobs:
- name: Checkout submodules (retry)
run: |
set -euo pipefail
if [ ! -f .gitmodules ]; then
echo "No .gitmodules found; skipping submodule update."
exit 0
fi
git submodule sync --recursive
for attempt in 1 2 3 4 5; do
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then