ci: caching should work?

This commit is contained in:
2025-03-22 17:47:33 +01:00
parent 9d6bcf25b9
commit 9d88f32f6a
3 changed files with 9 additions and 6 deletions

View File

@@ -38,6 +38,9 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
secrets: |
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
TURBO_TEAM=${{ secrets.TURBO_TEAM }}
- name: Emit a webhook to the server
env:

View File

@@ -1,5 +1,5 @@
FROM node:lts-alpine AS base
FROM base AS builder
RUN apk update
RUN apk add --no-cache libc6-compat
@@ -23,10 +23,9 @@ WORKDIR /app
# First install the dependencies (as they change less often)
COPY --from=builder /app/out/json/ .
RUN yarn install --frozen-lockfile
# Build the project
COPY --from=builder /app/out/full/ .
RUN yarn turbo run build
RUN --mount=type=secret,id=TURBO_TOKEN --mount=type=secret,id=TURBO_TEAM TURBO_TOKEN=$(cat /run/secrets/TURBO_TOKEN) TURBO_TEAM=$(cat /run/secrets/TURBO_TEAM) yarn turbo run build
FROM base AS runner
WORKDIR /app

View File

@@ -8,10 +8,11 @@
"packages/*"
],
"scripts": {
"build": "turbo run build",
"build": "dotenvx run -f .env.docker -- turbo run build",
"dev": "turbo run dev",
"lint": "turbo run lint",
"docker:web": "docker build -t srizan10/hclive -f apps/web/Dockerfile ."
"docker:web": "dotenvx run -f .env.docker -- docker buildx build --platform linux/amd64 -f apps/web/Dockerfile . --build-arg TURBO_TEAM=\"ducktors\" --secret id=TURBO_TOKEN,env=TURBO_TOKEN --secret id=TURBO_TEAM,env=TURBO_TEAM --no-cache",
"denv:install": "curl -fsS https://dotenvx.sh | sudo sh"
},
"devDependencies": {
"turbo": "^2.4.4"