diff --git a/.gitea/workflows/build-iso-windows.yaml b/.gitea/workflows/build-iso-windows.yaml index 1509e48..bb95671 100644 --- a/.gitea/workflows/build-iso-windows.yaml +++ b/.gitea/workflows/build-iso-windows.yaml @@ -184,6 +184,15 @@ jobs: # RUNNER_TEMP is per-job/ephemeral. Keep the latest validated build at a # stable path so it can be retrieved (e.g. for VM boot-testing) out of band. New-Item -ItemType Directory -Force 'C:\silvermetal\out' | Out-Null + # The ISO is already built + validated; free the build working set (extracted ISO + # tree + the mounted/expanded install.wim + the 5GB base ISO) BEFORE the ~5GB persist + # copy, or the single-volume runner runs out of space mid-copy. The ISO itself lives + # in RUNNER_TEMP\out (untouched) and the SBOM/SHA uploads read from there too. + $before = [math]::Round((Get-PSDrive C).Free/1GB,1) + Remove-Item "$env:RUNNER_TEMP\smbuild" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item "$env:RUNNER_TEMP\base.iso" -Force -ErrorAction SilentlyContinue + $after = [math]::Round((Get-PSDrive C).Free/1GB,1) + Write-Host " freed build working set: C: ${before}GB -> ${after}GB before persist" Copy-Item "$env:RUNNER_TEMP\out\*" 'C:\silvermetal\out\' -Force Get-ChildItem 'C:\silvermetal\out' | ForEach-Object { Write-Host $_.Name }