Skip to content

Commit 135aec8

Browse files
committed
fix cabal build cache
1 parent dfdf3f0 commit 135aec8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
context: .
3434
file: Dockerfile
3535
platforms: linux/arm64
36+
cache-from: type=gha
37+
cache-to: type=gha,mode=max
3638
push: true
3739
tags: |
3840
ghcr.io/xetera/placewaifu:${{ env.placewaifu_version }}

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ ENV LANGUAGE=en_US:en
2626
ENV LC_ALL=en_US.UTF-8
2727

2828
COPY package.yaml placewaifu.cabal ./
29-
RUN --mount=type=cache,id=cabal-deps,target=/root/.cabal cabal build --only-dependencies -j4
29+
RUN --mount=type=cache,target=/root/.local/state/cabal/store \
30+
--mount=type=cache,target=/root/.cache/cabal \
31+
--mount=type=cache,target=./dist-newstyle \
32+
cabal update && cabal build --only-dependencies -j4
3033

3134
COPY ./ ./
32-
RUN --mount=type=cache,id=cabal,target=/root/.cabal cabal install
35+
RUN cabal install
3336

3437
FROM ubuntu
3538

0 commit comments

Comments
 (0)