From 5385f5e6b848303355bdef9d6b4b091058323982 Mon Sep 17 00:00:00 2001 From: Ciaran Sweet Date: Thu, 11 Jun 2026 22:55:15 +0100 Subject: [PATCH] feat: cache image layers for pushing/building in actions --- .github/workflows/ci.yml | 2 ++ .github/workflows/deploy.yml | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52c38d6..a03f1d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,3 +64,5 @@ jobs: context: . push: false build-args: TOOLSET=${{ matrix.toolset }} + cache-from: type=gha,scope=mcp-${{ matrix.toolset }} + cache-to: type=gha,scope=mcp-${{ matrix.toolset }},mode=max diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7a170e5..2d09249 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -59,6 +59,8 @@ jobs: push: true build-args: TOOLSET=${{ matrix.toolset }} tags: ${{ steps.image.outputs.repository }}:${{ github.sha }} + cache-from: type=gha,scope=mcp-${{ matrix.toolset }} + cache-to: type=gha,scope=mcp-${{ matrix.toolset }},mode=max - name: Configure kubeconfig run: | mkdir -p ~/.kube @@ -86,7 +88,9 @@ jobs: index: needs: detect - if: needs.detect.outputs.ingress == 'true' + # Skip no-op pushes (e.g. docs): the index image is built from shared code, + # and any shared-code change already selects all toolsets in detect. + if: needs.detect.outputs.ingress == 'true' && needs.detect.outputs.toolsets != '[]' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -105,6 +109,8 @@ jobs: push: true build-args: TOOLSET=mcp-runtime tags: ${{ steps.image.outputs.repository }}:${{ github.sha }} + cache-from: type=gha,scope=mcp-index + cache-to: type=gha,scope=mcp-index,mode=max - name: Configure kubeconfig run: | mkdir -p ~/.kube