From c72ce9a2999a4f1c1ad087b0c706cc38fc28f0f0 Mon Sep 17 00:00:00 2001 From: catborise Date: Sun, 8 Nov 2026 16:03:51 +0300 Subject: [PATCH] ci: the Docker image is built with a layer cache Each run built the image from nothing, compiling libvirt-python and python-ldap again. Buildx keeps the layers in GitHub's cache, so a run that changes only code rebuilds only the last stage. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea --- .github/workflows/test.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 977e6e05..e94fc45a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -157,8 +157,19 @@ jobs: echo sentinel > "$f" done + - name: Set Up Buildx + uses: docker/setup-buildx-action@v4 + + # The layers stay in GitHub's cache: a change of the code alone rebuilds + # only the last stage - name: Build Image - run: docker build -t webvirtcloud:ci . + uses: docker/build-push-action@v7 + with: + context: . + load: true + tags: webvirtcloud:ci + cache-from: type=gha + cache-to: type=gha,mode=max - name: No Runtime Data In Image run: |