Skip to content

Commit

Permalink
chore: move copy, enable cache-to
Browse files Browse the repository at this point in the history
  • Loading branch information
rafasdc committed Jan 16, 2025
1 parent f6e2e44 commit 6c6fcc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ jobs:
SENTRY_AUTH_TOKEN=${{ env.SENTRY_AUTH_TOKEN }}
GIT_HASH=${{ env.GIT_HASH }}
cache-from: type=registry,ref=${{ matrix.image }}:buildcache
# cache-to: type=registry,ref=${{ matrix.image }}:buildcache,mode=max
cache-to: ${{ github.ref == 'refs/heads/main' && 'type=registry,ref=${{ matrix.image }}:buildcache,mode=max' || '' }}
cache-to: type=registry,ref=${{ matrix.image }}:buildcache,mode=max
# cache-to: ${{ github.ref == 'refs/heads/main' && 'type=registry,ref=${{ matrix.image }}:buildcache,mode=max' || '' }}
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
Expand Down
4 changes: 2 additions & 2 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ RUN apk add --no-cache libc6-compat
FROM base AS deps

# Copy only package.json yarn.lock and the patches for caching purposes
COPY app/patches patches
COPY app/package.json .
COPY app/yarn.lock .
COPY app/patches patches

# Install all dependencies (including dev) to ensure build tools are available
RUN yarn --frozen-lockfile
Expand Down Expand Up @@ -67,9 +67,9 @@ RUN yarn build:next
FROM base AS prod-deps

# Copy only package.json yarn.lock and the patches for caching purposes
COPY app/patches patches
COPY app/package.json .
COPY app/yarn.lock .
COPY app/patches patches

# Install only production dependencies so this layer can be cached separately
RUN yarn install --frozen-lockfile --production=true --prefer-offline
Expand Down

0 comments on commit 6c6fcc3

Please sign in to comment.