File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,14 +98,25 @@ jobs:
9898 Write-Host "Tags: $tagsString"
9999
100100 - name : Build and push Windows container
101- uses : docker/build-push-action@v6
102- with :
103- context : .
104- file : Dockerfile.windows
105- build-args : |
106- WINDOWS_VERSION=${{ steps.tag.outputs.windows_version }}
107- WINDOWS_TYPE=${{ matrix.container_type }}
108- push : ${{ env.IMAGE_PUSH }}
109- tags : ${{ steps.meta.outputs.tags }}
110- cache-from : type=gha
111- cache-to : type=gha,mode=max
101+ shell : pwsh
102+ run : |
103+ $tags = "${{ steps.meta.outputs.tags }}".Split(",")
104+ $tagArgs = @()
105+ foreach ($tag in $tags) {
106+ $tagArgs += "-t"
107+ $tagArgs += $tag.Trim()
108+ }
109+
110+ docker build `
111+ --build-arg WINDOWS_VERSION=${{ steps.tag.outputs.windows_version }} `
112+ --build-arg WINDOWS_TYPE=${{ matrix.container_type }} `
113+ -f Dockerfile.windows `
114+ $tagArgs `
115+ .
116+
117+ if ("${{ env.IMAGE_PUSH }}" -eq "true") {
118+ foreach ($tag in $tags) {
119+ Write-Host "Pushing $($tag.Trim())"
120+ docker push $tag.Trim()
121+ }
122+ }
You can’t perform that action at this time.
0 commit comments