From 0c9e1f3c3c5ec1d48b54d0f7645a12825ba732a7 Mon Sep 17 00:00:00 2001 From: Suyash Jain Date: Sat, 10 Jan 2026 15:29:24 +0530 Subject: [PATCH 1/4] ci: enable Docker layer caching for cspell spellcheck job --- .github/workflows/run-ci-cd.yaml | 13 +++++++++++++ cspell/Makefile | 7 +++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-ci-cd.yaml b/.github/workflows/run-ci-cd.yaml index 5a7357ad13..f655526c49 100644 --- a/.github/workflows/run-ci-cd.yaml +++ b/.github/workflows/run-ci-cd.yaml @@ -104,6 +104,19 @@ jobs: - name: Check out repository uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + - name: Set up Docker buildx + uses: docker/setup-buildx-action@v3 + + - name: Build cspell image with cache + uses: docker/build-push-action@v5 + with: + context: cspell + file: cspell/Dockerfile + tags: cspell:ci + load: true + cache-from: type=gha + cache-to: type=gha,mode=max + - name: Run cspell run: | make check-spelling diff --git a/cspell/Makefile b/cspell/Makefile index fdb4576913..ca2f75e071 100644 --- a/cspell/Makefile +++ b/cspell/Makefile @@ -1,10 +1,9 @@ check-spelling: cspell-check cspell-install: - @DOCKER_BUILDKIT=1 docker build \ - --cache-from cspell \ - cspell \ - -t cspell + @docker image inspect cspell:ci >/dev/null 2>&1 && \ + docker tag cspell:ci cspell || \ + docker build -t cspell cspell cspell-check: CMD="--no-progress -r /nest" cspell-check: cspell-install cspell-run From 8a46db0cadd9cf05d97ab67852fe0c9638f23e30 Mon Sep 17 00:00:00 2001 From: Suyash Jain Date: Sat, 10 Jan 2026 15:47:31 +0530 Subject: [PATCH 2/4] ci: pin Docker GitHub Actions to commit SHAs --- .github/workflows/run-ci-cd.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-ci-cd.yaml b/.github/workflows/run-ci-cd.yaml index f655526c49..f90ff1a66d 100644 --- a/.github/workflows/run-ci-cd.yaml +++ b/.github/workflows/run-ci-cd.yaml @@ -105,10 +105,10 @@ jobs: uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 - name: Set up Docker buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f - name: Build cspell image with cache - uses: docker/build-push-action@v5 + uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 with: context: cspell file: cspell/Dockerfile From 12521667a9f728c7886c43983d684e1d5d18ef74 Mon Sep 17 00:00:00 2001 From: Suyash Jain Date: Sat, 10 Jan 2026 15:52:16 +0530 Subject: [PATCH 3/4] ci: scope GHA cache for cspell Docker build --- .github/workflows/run-ci-cd.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-ci-cd.yaml b/.github/workflows/run-ci-cd.yaml index f90ff1a66d..3cc1ebd4ce 100644 --- a/.github/workflows/run-ci-cd.yaml +++ b/.github/workflows/run-ci-cd.yaml @@ -114,8 +114,8 @@ jobs: file: cspell/Dockerfile tags: cspell:ci load: true - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=cspell + cache-to: type=gha,scope=cspell,mode=max - name: Run cspell run: | From 8e80b3a19554c3efce67a686f8825575a48a9987 Mon Sep 17 00:00:00 2001 From: Arkadii Yakovets Date: Sat, 10 Jan 2026 11:07:39 -0800 Subject: [PATCH 4/4] Update code --- .github/workflows/run-ci-cd.yaml | 8 ++++---- cspell/Makefile | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-ci-cd.yaml b/.github/workflows/run-ci-cd.yaml index 4f2623d225..7cd811eb08 100644 --- a/.github/workflows/run-ci-cd.yaml +++ b/.github/workflows/run-ci-cd.yaml @@ -107,15 +107,15 @@ jobs: - name: Set up Docker buildx uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f - - name: Build cspell image with cache + - name: Build cspell image uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 with: + cache-from: type=gha,scope=cspell + cache-to: type=gha,scope=cspell,mode=max context: cspell file: cspell/Dockerfile - tags: cspell:ci load: true - cache-from: type=gha,scope=cspell - cache-to: type=gha,scope=cspell,mode=max + tags: cspell:ci - name: Run cspell run: | diff --git a/cspell/Makefile b/cspell/Makefile index ca2f75e071..f1d65864bd 100644 --- a/cspell/Makefile +++ b/cspell/Makefile @@ -1,6 +1,8 @@ check-spelling: cspell-check cspell-install: + # Check if cspell:ci image exists (from CI build step), tag it to 'cspell' if found, + # otherwise build the image from scratch for local development. @docker image inspect cspell:ci >/dev/null 2>&1 && \ docker tag cspell:ci cspell || \ docker build -t cspell cspell