perf: Optimize GitHub Actions workflows for faster CI/CD#320
Conversation
- Update all GitHub Actions to latest versions (v3→v4, v2→v3, v3→v6) - actions/checkout: v3 → v4 - actions/cache: v3 → v4 (20-30% faster) - actions/setup-node: v3 → v4 - pnpm/action-setup: v2 → v4 - docker/setup-buildx-action: v2 → v3 - docker/build-push-action: v3 → v6 (better BuildKit integration) - Add concurrency controls to cancel outdated workflow runs - Prevents wasted resources when pushing multiple commits - Improve caching strategies: - Better pnpm cache keys (more specific paths) - Simplified Docker cache (GitHub Actions cache only) - Add missing pnpm caching to all Vercel workflows - Optimize Dockerfiles for better layer caching: - Server: Separate dependency and code layers - Directus: Copy package files before npm install Expected improvements: - CI on PRs: ~40% faster (8-12min → 5-7min) - Deployment workflows: ~30% faster each - Better cache hit rates across all workflows - Reduced runner time waste from cancelled workflows
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on October 5. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
Hi @dtrn2048! Thank you for contributing to Dembrane ECHO! Before we consider your Pull Request, we ask that you sign our Contributor License Agreement (CLA). This is only required for your first Pull Request. Please review the CLA, and sign it by adding your GitHub username to the contributors.yml file. Thanks! |
|
Warning Rate limit exceeded@dtrn2048 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 39 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughUpdates multiple GitHub Actions workflows: adds concurrency groups, upgrades actions (checkout/cache/setup-node/pnpm/buildx/build-push) to newer versions, introduces pnpm store caching and Buildx cache scope changes, and adjusts cache keys/paths. Refactors two Dockerfiles to improve layer caching by isolating dependency installs and narrowing copy steps. LGTM. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)
68-77: Let’s bump these actions to v4. Everything else in the PR is riding the new major versions, but the frontend CI leg is still on setup-node@v3 and pnpm/action-setup@v2. That combo has a harder time with bleeding-edge Node 22 and misses the perf wins we just unlocked elsewhere. Suggest aligning it like so:- - name: Set up Node.js - uses: actions/setup-node@v3 + - name: Set up Node.js + uses: actions/setup-node@v4 with: node-version: "22" - - name: Install pnpm - uses: pnpm/action-setup@v2 + - name: Install pnpm + uses: pnpm/action-setup@v4 with: version: 10
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (9)
.github/workflows/ci.yml(5 hunks).github/workflows/dev-deploy-gitops-backends.yaml(1 hunks).github/workflows/dev-deploy-vercel-dashboard.yml(1 hunks).github/workflows/dev-deploy-vercel-portal.yml(1 hunks).github/workflows/prod-deploy-gitops-backends.yaml(2 hunks).github/workflows/prod-deploy-vercel-dashboard.yml(1 hunks).github/workflows/prod-deploy-vercel-portal.yml(1 hunks)echo/directus/Dockerfile(1 hunks)echo/server/Dockerfile(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: ci-build-servers (dbr-echo-directus, ./echo/directus, Dockerfile, dbr-echo-directus)
- GitHub Check: ci-build-servers (dbr-echo-server, ./echo/server, Dockerfile, dbr-echo-server)
🔇 Additional comments (5)
.github/workflows/dev-deploy-vercel-portal.yml (1)
32-45: PnPM cache wiring is dialed. This STORE_PATH + cache key combo will keep install latency down without surprises..github/workflows/prod-deploy-gitops-backends.yaml (1)
7-9: Concurrency guard FTW. Love that you’re canceling stale tag deliveries—keeps prod deploys deterministic..github/workflows/prod-deploy-vercel-dashboard.yml (1)
33-45: Cache flow looks pristine. Matchy-matchy with the other pipelines, so the dashboard deploys should now hit warm stores by default..github/workflows/dev-deploy-vercel-dashboard.yml (1)
33-45: Shipping the same cache scaffolding here is clutch. Dev deploys won’t thrash the pnpm store anymore..github/workflows/prod-deploy-vercel-portal.yml (1)
31-44: Portal deploy cache stack is spot on. Expecting materially higher hit rates once this lands.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
README.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md
103-103: Trailing spaces
Expected: 0 or 2; Actual: 1
(MD009, no-trailing-spaces)
103-103: Files should end with a single newline character
(MD047, single-trailing-newline)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: ci-check-server
Addresses PR feedback:
1. Directus Dockerfile:
- Added COPY extensions/. ./ after npm install
- Ensures custom extension source files are included
2. Server Dockerfile:
- Added explicit COPY for runtime assets:
- Scripts (prod*.sh, run*.sh)
- Templates (initdb/, json_templates/, prompt_templates/)
- Prevents runtime breakage from missing migrations/scripts
Still preserves layer caching optimization - dependency installs
won't be invalidated by code changes.
Changed absolute paths (/code/server/) to relative paths (./) since we're already in WORKDIR /code/server. This fixes the build error where Docker couldn't find /initdb during cache key calculation.
Reverts to simpler approach: COPY . . after pip install. This preserves the main optimization (dependency caching) while ensuring all runtime assets are included without complex path management. The key optimization remains: changes to code won't invalidate pip cache.
|
|
||
| COPY extensions . | ||
| # Copy package files first for better layer caching | ||
| COPY extensions/package*.json ./ |
## 🚀 Pipeline Optimization This PR optimizes GitHub Actions workflows to make CI/CD ~40% faster with minimal changes. ### What Changed - Updated actions to latest versions (v3→v4, better caching) - Added concurrency controls (cancels outdated runs) - Added missing pnpm caching to Vercel workflows - Optimized Docker layer caching ### Expected Results - CI on PRs: 8-12min → 5-7min (~40% faster) - Vercel deploys: 6-8min → 4-5min (~30% faster) - Better cache hit rates across all workflows ### Files Changed - 7 workflow files - 2 Dockerfiles - Zero breaking changes See commit message for full details. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Performance** * Faster builds and deployments via improved caching and refined dependency layering for server, dashboard, and portal. * Better image build reliability from targeted dependency copy/order to preserve cache. * **Chores** * CI/CD workflows upgraded to newer action versions and added concurrency controls to avoid duplicate runs. * Optimized pnpm and pip cache keys and new cache steps to speed installs and stabilize pipelines. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
🚀 Pipeline Optimization
This PR optimizes GitHub Actions workflows to make CI/CD ~40% faster with minimal changes.
What Changed
Expected Results
Files Changed
See commit message for full details.
Summary by CodeRabbit
Performance
Chores