From 4d1d96f0adfd0e25762a218978b0a68a5eb61bce Mon Sep 17 00:00:00 2001 From: Flavio Giacchetti <38221678+ATAC-Helicopter@users.noreply.github.com> Date: Wed, 29 Jul 2026 15:21:19 +0200 Subject: [PATCH] Add CI cache reset control --- .github/workflows/build-container.yml | 6 ++++++ prototype/docs/CI.md | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 796fd41..3685dce 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -13,6 +13,11 @@ on: required: true type: string default: foundation + reset_cache: + description: Ignore cached layers and replace the cache after corruption or stale build inputs + required: true + type: boolean + default: false permissions: contents: read @@ -68,6 +73,7 @@ jobs: platforms: linux/amd64 push: ${{ inputs.publish }} pull: true + no-cache: ${{ inputs.reset_cache }} tags: ${{ env.IMAGE_REF }} cache-from: type=gha,scope=developer-os-amd64 cache-to: type=gha,mode=max,scope=developer-os-amd64 diff --git a/prototype/docs/CI.md b/prototype/docs/CI.md index d98b5d2..6f93e49 100644 --- a/prototype/docs/CI.md +++ b/prototype/docs/CI.md @@ -43,6 +43,10 @@ reusable cache. Bootc images are deliberately not loaded into Docker's classic local image store because their deep layer history can exceed Docker's import limit. +Leave **Reset cache** disabled for normal builds. Enable it if BuildKit reports +a truncated cached layer, `short read`, or `unexpected EOF`; the run will ignore +the damaged entry and replace it with a fresh cache. + ### Build bootable disk Run `build-disk.yml` after the container workflow succeeds. It starts a