[docker] Build with immutable lockfile and cache

This commit is contained in:
Laura Hausmann 2023-11-17 00:21:59 +01:00
parent a5b072016a
commit 64cffd2d68
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@ jobs:
run: | run: |
cd /iceshrimp cd /iceshrimp
cp -Tr /iceshrimp-caches/yarn .yarn cp -Tr /iceshrimp-caches/yarn .yarn
yarn yarn --immutable --immutable-cache
rm -rf /iceshrimp-caches/yarn/* && cp -Tr .yarn /iceshrimp-caches/yarn rm -rf /iceshrimp-caches/yarn/* && cp -Tr .yarn /iceshrimp-caches/yarn
- name: Build the shrimp - name: Build the shrimp
run: | run: |

View file

@ -13,7 +13,7 @@ COPY . ./
RUN --mount=type=cache,target=/iceshrimp/.yarncache cp -Tr .yarncache .yarn RUN --mount=type=cache,target=/iceshrimp/.yarncache cp -Tr .yarncache .yarn
# Configure corepack and install dev mode dependencies for compilation # Configure corepack and install dev mode dependencies for compilation
RUN corepack enable && corepack prepare --activate && yarn RUN corepack enable && corepack prepare --activate && yarn --immutable --immutable-cache
# Save yarn cache # Save yarn cache
RUN --mount=type=cache,target=/iceshrimp/.yarncache rm -rf .yarncache/* && cp -Tr .yarn .yarncache RUN --mount=type=cache,target=/iceshrimp/.yarncache rm -rf .yarncache/* && cp -Tr .yarn .yarncache