Browse code

.github: install buildx in Windows CI

Signed-off-by: Cory Snider <csnider@mirantis.com>

Cory Snider authored on 2026/02/04 09:43:40
Showing 2 changed files
... ...
@@ -93,9 +93,11 @@ jobs:
93 93
           New-Item -ItemType "directory" -Path "${{ env.BIN_OUT }}"
94 94
           docker cp "${{ env.TEST_CTN_NAME }}`:c`:\gopath\src\github.com\docker\docker\bundles\docker.exe" ${{ env.BIN_OUT }}\
95 95
           docker cp "${{ env.TEST_CTN_NAME }}`:c`:\gopath\src\github.com\docker\docker\bundles\dockerd.exe" ${{ env.BIN_OUT }}\
96
+          docker cp "${{ env.TEST_CTN_NAME }}`:c`:\gopath\src\github.com\docker\docker\bundles\docker-buildx.exe" ${{ env.BIN_OUT }}\
96 97
           docker cp "${{ env.TEST_CTN_NAME }}`:c`:\gopath\bin\gotestsum.exe" ${{ env.BIN_OUT }}\
97 98
           docker cp "${{ env.TEST_CTN_NAME }}`:c`:\containerd\bin\containerd.exe" ${{ env.BIN_OUT }}\
98 99
           docker cp "${{ env.TEST_CTN_NAME }}`:c`:\containerd\bin\containerd-shim-runhcs-v1.exe" ${{ env.BIN_OUT }}\
100
+          Get-ChildItem -Path ${{ env.BIN_OUT }}
99 101
       -
100 102
         name: Upload artifacts
101 103
         uses: actions/upload-artifact@v6
... ...
@@ -303,6 +305,9 @@ jobs:
303 303
         name: Init
304 304
         run: |
305 305
           New-Item -ItemType "directory" -Path "bundles" -ErrorAction SilentlyContinue
306
+          New-Item -ItemType "directory" -Path "${env:ProgramData}\Docker" -ErrorAction SilentlyContinue
307
+          New-Item -ItemType "directory" -Path "${env:ProgramData}\Docker\cli-plugins" -ErrorAction SilentlyContinue
308
+          Move-Item -Path "${{ env.BIN_OUT }}\docker-buildx.exe" -Destination "${env:ProgramData}\Docker\cli-plugins\docker-buildx.exe" -Force -ErrorAction Continue
306 309
           If ("${{ inputs.os }}" -eq "windows-2025") {
307 310
             echo "WINDOWS_BASE_IMAGE_TAG=${{ env.WINDOWS_BASE_TAG_2025 }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
308 311
           } ElseIf ("${{ inputs.os }}" -eq "windows-2022") {
... ...
@@ -540,6 +540,11 @@ Try {
540 540
             Finally {
541 541
                 Remove-Item -Force "docker.zip"
542 542
             }
543
+
544
+            if (-not ($buildx = $env:BUILDX_VERSION)) { $buildx = "0.31.1" }
545
+            Write-Host "INFO: Downloading docker/buildx version $buildx..."
546
+            $url = "https://github.com/docker/buildx/releases/download/v${buildx}/buildx-v${buildx}.windows-amd64.exe"
547
+            Invoke-WebRequest $url -OutFile "$PWD\bundles\docker-buildx.exe"
543 548
         }
544 549
     }
545 550