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
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: .turbo
|
path: .turbo
|
||||||
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
key: ${{ runner.os }}-turbo-${{ github.ref_name }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
|
${{ runner.os }}-turbo-${{ github.ref_name }}-
|
||||||
${{ runner.os }}-turbo-
|
${{ runner.os }}-turbo-
|
||||||
|
|
||||||
- name: 🧪 QA Checks
|
- 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
|
- name: 🏗️ Build
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
|
|||||||
@@ -175,15 +175,18 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: .turbo
|
path: .turbo
|
||||||
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
key: ${{ runner.os }}-turbo-${{ github.ref_name }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
|
${{ runner.os }}-turbo-${{ github.ref_name }}-
|
||||||
${{ runner.os }}-turbo-
|
${{ runner.os }}-turbo-
|
||||||
|
|
||||||
- name: 🔒 Security Audit
|
- name: 🔒 Security Audit
|
||||||
run: pnpm audit --audit-level high
|
run: pnpm audit --audit-level high
|
||||||
- name: 🧪 QA Checks
|
- name: 🧪 QA Checks
|
||||||
if: github.event.inputs.skip_checks != 'true'
|
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
|
# JOB 3: Build & Push
|
||||||
@@ -209,6 +212,8 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
provenance: false
|
provenance: false
|
||||||
platforms: linux/arm64
|
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: |
|
build-args: |
|
||||||
NEXT_PUBLIC_BASE_URL=${{ needs.prepare.outputs.next_public_url }}
|
NEXT_PUBLIC_BASE_URL=${{ needs.prepare.outputs.next_public_url }}
|
||||||
NEXT_PUBLIC_TARGET=${{ needs.prepare.outputs.target }}
|
NEXT_PUBLIC_TARGET=${{ needs.prepare.outputs.target }}
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ CMD ["pnpm", "dev:local"]
|
|||||||
# Build application
|
# Build application
|
||||||
# Stage 3: Builder (Production)
|
# Stage 3: Builder (Production)
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
RUN pnpm build
|
RUN --mount=type=cache,target=/app/.next/cache,id=nextjs-cache \
|
||||||
|
pnpm build
|
||||||
|
|
||||||
# Stage 3: Runner
|
# Stage 3: Runner
|
||||||
FROM registry.infra.mintel.me/mintel/runtime:v1.7.10 AS runner
|
FROM registry.infra.mintel.me/mintel/runtime:v1.7.10 AS runner
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
"prepare": "husky",
|
"prepare": "husky",
|
||||||
"preinstall": "npx only-allow pnpm"
|
"preinstall": "npx only-allow pnpm"
|
||||||
},
|
},
|
||||||
"version": "1.0.0",
|
"version": "1.0.1-rc.0",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"next": "16.1.6",
|
"next": "16.1.6",
|
||||||
|
|||||||
Reference in New Issue
Block a user