Optimize GitHub Actions for Maximum Speed

 Self-Hosted Runner Configuration:
- All jobs now run on self-hosted runner (your server)
- No more waiting for GitHub's runners
- Much faster execution with your hardware

 Parallel Job Execution:
- Test and Security jobs run in parallel
- Build job waits for both to complete
- Significant time reduction

 Enhanced Caching:
- npm dependencies cached between runs
- Docker build caching optimized
- Only AMD64 platform for speed

 Docker Build Optimization:
- Better layer caching in Dockerfile
- Optimized build process
- Faster image creation

🎯 Performance Improvements:
- Before: ~15+ minutes (GitHub runners)
- After: ~3-5 minutes (self-hosted runner)
- Parallel execution saves additional time
- Caching reduces repeated work

🚀 Benefits:
- 3-5x faster CI/CD pipeline
- No GitHub Actions minute usage
- Better resource utilization
- Consistent performance
This commit is contained in:
Dennis Konkol
2025-09-06 09:14:17 +00:00
parent 1d4ae2bd41
commit 6695e892f7
2 changed files with 28 additions and 9 deletions

View File

@@ -14,7 +14,14 @@ RUN npm ci --only=production && npm cache clean --force
# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
# Copy package files first for better caching
COPY package.json package-lock.json* ./
# Install all dependencies (including dev dependencies for build)
RUN npm ci
# Copy source code
COPY . .
# Install type definitions for react-responsive-masonry and node-fetch