🔧 fix: optimize Docker cache usage by removing redundant go mod tidy

- Remove unnecessary go mod tidy execution when using Docker cache
- Dependencies are already pre-installed in the cache image
- Only run go mod tidy when not using cache (native execution)
- This leverages the true purpose of the Docker build cache

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-04-07 23:22:30 +02:00
parent da0dc0e30f
commit 9213c97da6
2 changed files with 10 additions and 10 deletions

View File

@@ -177,13 +177,13 @@ jobs:
echo "CACHE_AVAILABLE=false" >> $GITHUB_ENV
fi
- name: Install dependencies
- name: Check dependencies
run: |
if [ "${{ env.CACHE_AVAILABLE }}" = "true" ]; then
echo "Running in Docker Compose container..."
docker compose -f docker-compose.build.yml exec -w /workspace build-cache sh -c "go mod tidy"
echo "✅ Using pre-installed dependencies from Docker cache"
# No need to run go mod tidy - dependencies are already in the cache
else
echo "Running natively..."
echo "Running natively - ensuring dependencies are up to date..."
go mod tidy
fi