From 7eec584a663b3c92737d66c53cc9187dde5a5b0c Mon Sep 17 00:00:00 2001 From: sysadmin Date: Wed, 10 Jun 2026 09:50:00 +0100 Subject: [PATCH] ci(windows): free disk space before build (clear prior ISO output) The boot.wim now carries WinPE-NetFx/PowerShell (collector), growing the image ~0.4GB, and each build persists a ~5GB ISO to C:\silvermetal\out. On the single-volume runner that accumulation starved oscdimg ('Insufficient disk space'). Clear prior output + stale smbuild work dirs at job start so free space self-heals each run. Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/build-iso-windows.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.gitea/workflows/build-iso-windows.yaml b/.gitea/workflows/build-iso-windows.yaml index 2838028..1509e48 100644 --- a/.gitea/workflows/build-iso-windows.yaml +++ b/.gitea/workflows/build-iso-windows.yaml @@ -40,6 +40,22 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Free disk space + shell: pwsh + run: | + # Each successful build persists a ~5 GB ISO to C:\silvermetal\out, and the + # boot.wim now carries WinPE-NetFx/PowerShell (bigger image). On the single-volume + # runner that accumulation starves oscdimg ("Insufficient disk space"). Clear the + # prior build output + any stale work dir before building so space self-heals. + $before = [math]::Round((Get-PSDrive C).Free/1GB,1) + Remove-Item 'C:\silvermetal\out\*' -Recurse -Force -ErrorAction SilentlyContinue + Get-ChildItem 'C:\gitea-runner\workspace' -Directory -ErrorAction SilentlyContinue | ForEach-Object { + $t = Join-Path $_.FullName 'tmp\smbuild' + if (Test-Path $t) { Remove-Item $t -Recurse -Force -ErrorAction SilentlyContinue } + } + $after = [math]::Round((Get-PSDrive C).Free/1GB,1) + Write-Host " C: free ${before}GB -> ${after}GB (cleared prior ISO output + stale smbuild)" + - name: Ensure Windows ADK (oscdimg) shell: pwsh run: | -- 2.39.5