From 67e2d0b4fb4ab5fcc1f5a304a4feb05b6fa345e3 Mon Sep 17 00:00:00 2001 From: ThanhNguyxn Date: Fri, 30 Jan 2026 22:56:50 +0700 Subject: [PATCH] ci: skip submodule update when no .gitmodules --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 885d87fcb..a2abe26ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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