Compare commits

..

2 commits

Author SHA1 Message Date
Chris Parsons
bbf4aa4668 Remove setup-node from CI jobs — runner has Node pre-installed
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 1m34s
🚀 Deploy / ʦ TypeScript (pull_request) Successful in 1m25s
🚀 Deploy / 🔍 Lint (pull_request) Successful in 53s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
setup-node@v4 was downloading Node 20 from GitHub (~5 min) instead of
using the runner's pre-installed copy. The Forgejo runner also has no
cache service backend (ETIMEDOUT on save/restore), so the cache: npm
integration provided no benefit and only added overhead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 21:03:56 -07:00
Chris Parsons
2c4575c693 Optimize CI build pipeline and harden .npmrc handling
Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Successful in 11m40s
🚀 Deploy / ʦ TypeScript (pull_request) Successful in 10m35s
🚀 Deploy / 🐳 Build (pull_request) Has been cancelled
🚀 Deploy / 🚀 Deploy (pull_request) Has been cancelled
🚀 Deploy / 🔍 Lint (pull_request) Has been cancelled
- Fix Dockerfile dev-deps layer cache invalidation: copy only package manifests
  before npm ci so the layer is reused on code-only commits
- Skip QEMU by pinning platforms: linux/amd64 in build-push-action (~4 min saving)
- Replace manual actions/cache blocks with actions/setup-node cache: npm in
  test/typecheck/lint jobs (removes 3 duplicate 8-line blocks, pins Node 20)
- Pass .npmrc as a Docker BuildKit secret (--mount=type=secret) instead of
  COPYing it, so it can never leak into registry build-cache layers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 20:40:35 -07:00
2 changed files with 7 additions and 4 deletions

View file

@ -100,9 +100,12 @@ jobs:
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ vars.CONTAINER_REGISTRY }}/brackt:latest
cache-from: type=registry,ref=${{ vars.CONTAINER_REGISTRY }}/brackt:buildcache
cache-to: type=registry,ref=${{ vars.CONTAINER_REGISTRY }}/brackt:buildcache,mode=max
secret-files: |
npmrc=./.npmrc
deploy:
name: 🚀 Deploy

View file

@ -1,12 +1,12 @@
FROM node:20-alpine AS development-dependencies-env
COPY . /app
COPY package.json package-lock.json /app/
WORKDIR /app
RUN npm ci
RUN --mount=type=secret,id=npmrc,target=/app/.npmrc npm ci
FROM node:20-alpine AS production-dependencies-env
COPY ./package.json package-lock.json .npmrc /app/
COPY ./package.json package-lock.json /app/
WORKDIR /app
RUN npm ci --omit=dev
RUN --mount=type=secret,id=npmrc,target=/app/.npmrc npm ci --omit=dev
FROM node:20-alpine AS build-env
COPY . /app/