From ccb9b99a613e857bcd77ce5fa0edc95fc44d6c7d Mon Sep 17 00:00:00 2001 From: Marat Abrarov Date: Sat, 4 Apr 2026 19:25:05 +0300 Subject: [PATCH] workflows: Windows Docker insufficient disk space fix Signed-off-by: Marat Abrarov --- .github/workflows/call-build-images.yaml | 20 ++++++++++++++++++++ .github/workflows/pr-image-tests.yaml | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/.github/workflows/call-build-images.yaml b/.github/workflows/call-build-images.yaml index 5174c0f5cfd..11c70617ba0 100644 --- a/.github/workflows/call-build-images.yaml +++ b/.github/workflows/call-build-images.yaml @@ -413,6 +413,26 @@ jobs: username: ${{ inputs.username }} password: ${{ secrets.token }} + # https://github.com/actions/runner-images/issues/12199 + # https://github.com/moby/moby/issues/48093 + # https://support.microsoft.com/en-us/topic/gettemppath-changes-in-windows-february-cumulative-update-preview-4cc631fb-9d97-4118-ab6d-f643cd0a7259#ID0EDF + - name: Change system temp directory to the drive having sufficient disk space + id: relocate-system-temp-dir + run: | + $ErrorActionPreference = "Stop" + if (Test-Path -Path "D:\") { + $newSystemTempDir = "D:\SystemTemp" + New-Item -ItemType Directory -Path "${newSystemTempDir}" -Force + $acl = New-Object System.Security.AccessControl.DirectorySecurity + $acl.SetSecurityDescriptorSddlForm("O:SYG:SYD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)") + Set-Acl "${newSystemTempDir}" -AclObject ${acl} + [Environment]::SetEnvironmentVariable("SYSTEMTEMP", "${newSystemTempDir}", [EnvironmentVariableTarget]::Machine) + Restart-Service docker + } else { + Write-Warning "Drive D doesn't exist, so there is no disk to relocate system temp directory" + } + shell: pwsh + - name: Pull the last release image to speed up the build with a cache continue-on-error: true run: | diff --git a/.github/workflows/pr-image-tests.yaml b/.github/workflows/pr-image-tests.yaml index 6ffd94a507d..06f7116567d 100644 --- a/.github/workflows/pr-image-tests.yaml +++ b/.github/workflows/pr-image-tests.yaml @@ -108,6 +108,26 @@ jobs: flavor: | suffix=-windows-${{ matrix.windows-base-version }} + # https://github.com/actions/runner-images/issues/12199 + # https://github.com/moby/moby/issues/48093 + # https://support.microsoft.com/en-us/topic/gettemppath-changes-in-windows-february-cumulative-update-preview-4cc631fb-9d97-4118-ab6d-f643cd0a7259#ID0EDF + - name: Change system temp directory to the drive having sufficient disk space + id: relocate-system-temp-dir + run: | + $ErrorActionPreference = "Stop" + if (Test-Path -Path "D:\") { + $newSystemTempDir = "D:\SystemTemp" + New-Item -ItemType Directory -Path "${newSystemTempDir}" -Force + $acl = New-Object System.Security.AccessControl.DirectorySecurity + $acl.SetSecurityDescriptorSddlForm("O:SYG:SYD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)") + Set-Acl "${newSystemTempDir}" -AclObject ${acl} + [Environment]::SetEnvironmentVariable("SYSTEMTEMP", "${newSystemTempDir}", [EnvironmentVariableTarget]::Machine) + Restart-Service docker + } else { + Write-Warning "Drive D doesn't exist, so there is no disk to relocate system temp directory" + } + shell: pwsh + - name: Build the windows images id: build run: |