File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -413,6 +413,26 @@ jobs:
413413 username : ${{ inputs.username }}
414414 password : ${{ secrets.token }}
415415
416+ # https://github.com/actions/runner-images/issues/12199
417+ # https://github.com/moby/moby/issues/48093
418+ # https://support.microsoft.com/en-us/topic/gettemppath-changes-in-windows-february-cumulative-update-preview-4cc631fb-9d97-4118-ab6d-f643cd0a7259#ID0EDF
419+ - name : Change system temp directory to the drive having sufficient disk space
420+ id : relocate-system-temp-dir
421+ run : |
422+ $ErrorActionPreference = "Stop"
423+ if (Test-Path -Path "D:\") {
424+ $newSystemTempDir = "D:\SystemTemp"
425+ New-Item -ItemType Directory -Path "${newSystemTempDir}" -Force
426+ $acl = New-Object System.Security.AccessControl.DirectorySecurity
427+ $acl.SetSecurityDescriptorSddlForm("O:SYG:SYD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)")
428+ Set-Acl "${newSystemTempDir}" -AclObject ${acl}
429+ [Environment]::SetEnvironmentVariable("SYSTEMTEMP", "${newSystemTempDir}", [EnvironmentVariableTarget]::Machine)
430+ Restart-Service docker
431+ } else {
432+ Write-Warning "Drive D doesn't exist, so there is no disk to relocate system temp directory"
433+ }
434+ shell : pwsh
435+
416436 - name : Pull the last release image to speed up the build with a cache
417437 continue-on-error : true
418438 run : |
Original file line number Diff line number Diff line change @@ -108,6 +108,26 @@ jobs:
108108 flavor : |
109109 suffix=-windows-${{ matrix.windows-base-version }}
110110
111+ # https://github.com/actions/runner-images/issues/12199
112+ # https://github.com/moby/moby/issues/48093
113+ # https://support.microsoft.com/en-us/topic/gettemppath-changes-in-windows-february-cumulative-update-preview-4cc631fb-9d97-4118-ab6d-f643cd0a7259#ID0EDF
114+ - name : Change system temp directory to the drive having sufficient disk space
115+ id : relocate-system-temp-dir
116+ run : |
117+ $ErrorActionPreference = "Stop"
118+ if (Test-Path -Path "D:\") {
119+ $newSystemTempDir = "D:\SystemTemp"
120+ New-Item -ItemType Directory -Path "${newSystemTempDir}" -Force
121+ $acl = New-Object System.Security.AccessControl.DirectorySecurity
122+ $acl.SetSecurityDescriptorSddlForm("O:SYG:SYD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)")
123+ Set-Acl "${newSystemTempDir}" -AclObject ${acl}
124+ [Environment]::SetEnvironmentVariable("SYSTEMTEMP", "${newSystemTempDir}", [EnvironmentVariableTarget]::Machine)
125+ Restart-Service docker
126+ } else {
127+ Write-Warning "Drive D doesn't exist, so there is no disk to relocate system temp directory"
128+ }
129+ shell : pwsh
130+
111131 - name : Build the windows images
112132 id : build
113133 run : |
You can’t perform that action at this time.
0 commit comments