mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
chore: speed up Docker builds
- drop arm64/QEMU — build amd64 only - add pnpm store cache mounts to client and server install steps
This commit is contained in:
@@ -97,9 +97,6 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
|
||||
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
|
||||
with:
|
||||
@@ -115,6 +112,6 @@ jobs:
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: ${{ steps.vars.outputs.tags }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
platforms: linux/amd64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
+4
-2
@@ -8,7 +8,8 @@ WORKDIR /app
|
||||
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
|
||||
COPY packages/ packages/
|
||||
COPY client/package.json ./client/
|
||||
RUN pnpm install --filter client... --frozen-lockfile
|
||||
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
|
||||
pnpm install --filter client... --frozen-lockfile
|
||||
|
||||
COPY client/ ./client/
|
||||
RUN pnpm --filter client run build-only
|
||||
@@ -21,7 +22,8 @@ WORKDIR /app
|
||||
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
|
||||
COPY packages/ packages/
|
||||
COPY server/package.json ./server/
|
||||
RUN pnpm install --filter server... --frozen-lockfile
|
||||
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
|
||||
pnpm install --filter server... --frozen-lockfile
|
||||
|
||||
COPY server/ ./server/
|
||||
RUN pnpm --filter server run build
|
||||
|
||||
Reference in New Issue
Block a user