From c913f6c9e4aec3340feb098b21f03ade9bd92737 Mon Sep 17 00:00:00 2001 From: castrojo Date: Tue, 4 Aug 2026 19:22:31 +0000 Subject: [PATCH] ci: reclaim runner disk before image builds Free hosted-runner space before extracting image layers, and document the shared disk-space preparation pattern. Assisted-by: goose --- .github/workflows/build.yml | 6 ++++++ docs/skills/ci.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 docs/skills/ci.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25f87dff8..715df9211 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,6 +36,12 @@ jobs: with: submodules: recursive + # Keep large image/layer extraction from exhausting the hosted runner. + - name: Free disk space + uses: ublue-os/remove-unwanted-software@695eb75bc387dbcd9685a8e72d23439d8686cba6 # v10 + with: + extra-squeeze: "true" + - name: Generate tags id: generate-tags shell: bash diff --git a/docs/skills/ci.md b/docs/skills/ci.md new file mode 100644 index 000000000..31ffe8518 --- /dev/null +++ b/docs/skills/ci.md @@ -0,0 +1,32 @@ +# CI disk-space preparation + +## When to use + +Use this guidance when changing a hosted workflow that builds or extracts +large OCI, OSTree, or ISO payloads. + +## Pattern + +Hosted runners should reclaim disk space before large payload extraction. The +common image build workflow starts with +`ublue-os/remove-unwanted-software@v10` and enables `extra-squeeze: "true"`. +Keep this step immediately after checkout so later package installation and +image assembly benefit from the reclaimed space. + +The pinned action reference currently used by the shared runner action is: + +```yaml +uses: ublue-os/remove-unwanted-software@695eb75bc387dbcd9685a8e72d23439d8686cba6 # v10 +with: + extra-squeeze: "true" +``` + +## Verification + +Re-derive the workflow behavior from source before changing this guidance: + +```bash +grep -n -A8 -B3 'Free disk space' .github/workflows/build.yml +gh api repos/projectbluefin/actions/contents/bootc-build/setup-runner/action.yml \ + --jq .content | base64 -d | grep -n -A5 -B3 'Maximize build space' +```