ci: skip submodule update when no .gitmodules

This commit is contained in:
ThanhNguyxn 2026-01-30 22:56:50 +07:00
parent b58edde8c1
commit 67e2d0b4fb

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