mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-25 12:42:12 +08:00
fix: use safe submodule init in workflows.
This commit is contained in:
parent
5e813ef079
commit
3ea3ef48df
@ -15,6 +15,27 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
# submodules: "recursive"
|
||||||
|
|
||||||
|
- name: Safe submodule initialization
|
||||||
|
run: |
|
||||||
|
echo "Checking for submodules..."
|
||||||
|
if [ -f .gitmodules ]; then
|
||||||
|
if [ -s .gitmodules ]; then
|
||||||
|
echo "Initializing submodules..."
|
||||||
|
if git submodule sync --recursive 2>/dev/null; then
|
||||||
|
git submodule update --init --force --recursive || {
|
||||||
|
echo "Warning: Some submodules failed to initialize, continuing anyway..."
|
||||||
|
}
|
||||||
|
else
|
||||||
|
echo "Warning: Submodule sync failed, continuing without submodules..."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo ".gitmodules exists but is empty, skipping submodule initialization"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "No .gitmodules file found, no submodules to initialize"
|
||||||
|
fi
|
||||||
|
|
||||||
# Step 2: Set up Git with official account
|
# Step 2: Set up Git with official account
|
||||||
- name: Set up Git
|
- name: Set up Git
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user