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: |