Skip to content

Commit 8109f86

Browse files
committed
meow
1 parent 2addd06 commit 8109f86

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

.github/workflows/build-nightly-container.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ jobs:
3939
username: ${{ secrets.QUAY_USERNAME }}
4040
password: ${{ secrets.QUAY_PASSWORD }}
4141

42-
# - name: Cache shards
43-
# uses: actions/cache@v4
44-
# id: shards-cache
45-
# with:
46-
# path: shards-lib
47-
# key: docker-shards-${{ hashFiles('shard.lock') }}
42+
- name: Cache shards
43+
uses: actions/cache@v4
44+
id: shards-cache
45+
with:
46+
path: shards-lib
47+
key: docker-shards-${{ hashFiles('shard.lock') }}
4848

4949
- name: Cache crystal build cache (mainly scripts)
5050
uses: actions/cache@v4
@@ -53,15 +53,15 @@ jobs:
5353
path: scripts-cache
5454
key: docker-crystal-${{ hashFiles('./scripts') }}
5555

56-
# - name: Restore Docker cache mounts
57-
# uses: reproducible-containers/buildkit-cache-dance@v3
58-
# with:
59-
# builder: ${{ steps.setup-buildx.outputs.name }}
60-
# cache-map: |
61-
# {
62-
# "shards-lib": "/invidious/lib"
63-
# }
64-
# skip-extraction: ${{ steps.cache.outputs.cache-hit }}
56+
- name: Restore Docker cache mounts
57+
uses: reproducible-containers/buildkit-cache-dance@v3
58+
with:
59+
builder: ${{ steps.setup-buildx.outputs.name }}
60+
cache-map: |
61+
{
62+
"shards-lib": "./lib"
63+
}
64+
skip-extraction: ${{ steps.shards-cache.outputs.cache-hit }}
6565

6666
- name: Restore Docker cache mounts
6767
uses: reproducible-containers/buildkit-cache-dance@v3

docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ ARG release
77
WORKDIR /invidious
88
COPY ./shard.yml ./shard.yml
99
COPY ./shard.lock ./shard.lock
10-
RUN shards install --production
10+
RUN --mount=type=cache,target=./lib \
11+
shards install --production
1112

1213
COPY ./src/ ./src/
1314
# TODO: .git folder is required for building – this is destructive.

0 commit comments

Comments
 (0)