File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -56,14 +56,20 @@ jobs:
5656 # Initialize git submodules with cache restoration
5757 - name : Initialize Git Submodules
5858 run : |
59+ echo "Setting up git submodules..."
60+
61+ # First, ensure git knows about the submodules
62+ git submodule init
63+
5964 if [ "${{ steps.cache-submodules.outputs.cache-hit }}" == "true" ]; then
60- echo "✓ Submodules restored from cache, reinitializing git references..."
61- # The cached directories exist but .git files have wrong paths
62- # Force reinitialize to fix the .git file references
63- git submodule update --init --recursive --force
65+ echo "✓ Submodules restored from cache, syncing URLs and updating..."
66+ # Sync URLs in case they changed
67+ git submodule sync --recursive
68+ # Update with existing cached content
69+ git submodule update --recursive
6470 else
6571 echo "Cache miss - downloading submodules..."
66- git submodule update --init -- recursive
72+ git submodule update --recursive
6773 fi
6874
6975 # Verify submodules are working
You can’t perform that action at this time.
0 commit comments