From fa1c5f04f33515de42bc2128cdc62714dc0c6f98 Mon Sep 17 00:00:00 2001 From: Rui Dias Gomes <66125272+rmdg88@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:15:12 +0100 Subject: [PATCH] ci: improve caching steps (#371) Signed-off-by: rmdg88 --- .github/workflows/job-image.yml | 4 +++- .pre-commit-config.yaml | 2 +- Containerfile | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/job-image.yml b/.github/workflows/job-image.yml index e859c13..f98fdfd 100644 --- a/.github/workflows/job-image.yml +++ b/.github/workflows/job-image.yml @@ -108,6 +108,7 @@ jobs: cache-to: type=gha,mode=max file: Containerfile build-args: ${{ inputs.build_args }} + pull: true ## ## This stage runs after the build, so it leverages all build cache ## @@ -226,7 +227,8 @@ jobs: cache-to: type=gha,mode=max file: Containerfile build-args: ${{ inputs.build_args }} + pull: true - - name: Remove Local Docker Images + - name: Remove local Docker images run: | docker image prune -af diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3f709a7..15f827d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,6 +34,6 @@ repos: files: \.md$ - repo: https://github.com/astral-sh/uv-pre-commit # uv version, https://github.com/astral-sh/uv-pre-commit/releases - rev: 0.8.3 + rev: 0.8.19 hooks: - id: uv-lock diff --git a/Containerfile b/Containerfile index 408eeb6..ced7a84 100644 --- a/Containerfile +++ b/Containerfile @@ -1,6 +1,6 @@ ARG BASE_IMAGE=quay.io/sclorg/python-312-c9s:c9s -ARG UV_VERSION=0.8.3 +ARG UV_IMAGE=ghcr.io/astral-sh/uv:0.8.19 ARG UV_SYNC_EXTRA_ARGS="" @@ -25,7 +25,7 @@ RUN /usr/bin/fix-permissions /opt/app-root/src/.cache ENV TESSDATA_PREFIX=/usr/share/tesseract/tessdata/ -FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_stage +FROM ${UV_IMAGE} AS uv_stage ################################################################################################### # Docling layer #