mirror of
https://github.com/zensical/zensical.git
synced 2026-05-03 09:30:43 +00:00
performance: set up cache mount for build via Dockerfile
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
This commit is contained in:
@@ -270,15 +270,21 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
IMAGE: ${{ github.event.repository.full_name }}
|
||||
DOCKER_BUILDKIT: 1
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.sha }}
|
||||
|
||||
- name: Set up Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
load: true
|
||||
tags: ${{ env.IMAGE }}:latest
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
+4
-1
@@ -62,7 +62,10 @@ COPY README.md README.md
|
||||
COPY uv.lock uv.lock
|
||||
|
||||
# Install dependencies
|
||||
RUN uv sync --dev --no-install-project
|
||||
RUN --mount=type=cache,target=/root/.cargo/registry \
|
||||
--mount=type=cache,target=/root/.cargo/git \
|
||||
--mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --dev --no-install-project
|
||||
|
||||
# Copy files to build project
|
||||
COPY . .
|
||||
|
||||
Reference in New Issue
Block a user