ci: v0.13.0 — plain-progress image build, bun cache mounts + actions/cache around dep install

This commit is contained in:
2026-09-19 07:53:22 +00:00
parent 543aad310c
commit 579d425b64
3 changed files with 29 additions and 6 deletions
+5 -5
View File
@@ -1,17 +1,17 @@
# Multi-stage build: bun for installs (fast), node for build + runtime.
# No BuildKit type=cache mounts: they don't persist across builds on this daemon
# (Docker 29 + containerd image store), and bun install is fast enough (~3s cold)
# that cross-build tarball caching isn't worth the complexity.
# The bun install steps use a BuildKit cache mount (/root/.bun/install/cache, both stages
# run as root) so the package cache persists across builds on daemons that keep named
# caches — notably the CI runner's shared dind daemon; where it doesn't persist it costs nothing.
FROM oven/bun:1.4.2-alpine AS deps
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
RUN --mount=type=cache,target=/root/.bun/install/cache bun install --frozen-lockfile
# Production dependencies only — devDeps (typescript, vitest, @types) are build-time only.
FROM oven/bun:1.4.2-alpine AS prod-deps
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --production --frozen-lockfile
RUN --mount=type=cache,target=/root/.bun/install/cache bun install --production --frozen-lockfile
FROM node:22-alpine AS build
WORKDIR /app