chore(ci): Optimize Turborepo cache restoring and add Next.js BuildKit caching
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 29s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / ♿ WCAG (push) Has been cancelled
Build & Deploy / 🛡️ Quality Gates (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🧪 QA (push) Successful in 1m45s
Build & Deploy / 🏗️ Build (push) Has been cancelled
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 29s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / ♿ WCAG (push) Has been cancelled
Build & Deploy / 🛡️ Quality Gates (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🧪 QA (push) Successful in 1m45s
Build & Deploy / 🏗️ Build (push) Has been cancelled
This commit is contained in:
@@ -50,12 +50,15 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .turbo
|
||||
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
||||
key: ${{ runner.os }}-turbo-${{ github.ref_name }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-turbo-${{ github.ref_name }}-
|
||||
${{ runner.os }}-turbo-
|
||||
|
||||
- name: 🧪 QA Checks
|
||||
run: npx turbo run check:mdx lint typecheck test
|
||||
env:
|
||||
TURBO_TELEMETRY_DISABLED: 1
|
||||
run: npx turbo run check:mdx lint typecheck test --cache-dir=".turbo"
|
||||
|
||||
- name: 🏗️ Build
|
||||
run: pnpm build
|
||||
|
||||
@@ -175,15 +175,18 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .turbo
|
||||
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
||||
key: ${{ runner.os }}-turbo-${{ github.ref_name }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-turbo-${{ github.ref_name }}-
|
||||
${{ runner.os }}-turbo-
|
||||
|
||||
- name: 🔒 Security Audit
|
||||
run: pnpm audit --audit-level high
|
||||
- name: 🧪 QA Checks
|
||||
if: github.event.inputs.skip_checks != 'true'
|
||||
run: npx turbo run lint check:spell typecheck test
|
||||
env:
|
||||
TURBO_TELEMETRY_DISABLED: 1
|
||||
run: npx turbo run lint check:spell typecheck test --cache-dir=".turbo"
|
||||
|
||||
# ──────────────────────────────────────────────────────────────────────────────
|
||||
# JOB 3: Build & Push
|
||||
@@ -209,6 +212,8 @@ jobs:
|
||||
push: true
|
||||
provenance: false
|
||||
platforms: linux/arm64
|
||||
cache-from: type=gha,scope=nextjs-build-${{ needs.prepare.outputs.target }}
|
||||
cache-to: type=gha,mode=max,scope=nextjs-build-${{ needs.prepare.outputs.target }}
|
||||
build-args: |
|
||||
NEXT_PUBLIC_BASE_URL=${{ needs.prepare.outputs.next_public_url }}
|
||||
NEXT_PUBLIC_TARGET=${{ needs.prepare.outputs.target }}
|
||||
|
||||
@@ -41,7 +41,8 @@ CMD ["pnpm", "dev:local"]
|
||||
# Build application
|
||||
# Stage 3: Builder (Production)
|
||||
FROM base AS builder
|
||||
RUN pnpm build
|
||||
RUN --mount=type=cache,target=/app/.next/cache,id=nextjs-cache \
|
||||
pnpm build
|
||||
|
||||
# Stage 3: Runner
|
||||
FROM registry.infra.mintel.me/mintel/runtime:v1.7.10 AS runner
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
"prepare": "husky",
|
||||
"preinstall": "npx only-allow pnpm"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1-rc.0",
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"next": "16.1.6",
|
||||
|
||||
Reference in New Issue
Block a user