File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,12 +67,16 @@ jobs:
6767 run : |
6868 $tags = @"
6969 ${{ steps.tags.outputs.tags }}
70- "@ -split "`n" | Where -Object { $_.Trim() }
70+ "@ -split "`n" | ForEach -Object { $_.Trim() } | Where-Object { $_ }
7171
72- $tagArgs = ($tags | ForEach-Object { "-t", $_.Trim() }) -join " "
72+ # Build tag arguments as an array for proper splatting
73+ $tagArgList = @()
74+ foreach ($tag in $tags) {
75+ $tagArgList += @('-t', $tag)
76+ }
7377
7478 Write-Host "Building with tags: $($tags -join ', ')"
75- docker build $tagArgs --build-arg GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} docker/
79+ docker build @tagArgList --build-arg GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} docker/
7680
7781 - name : Push Docker image
7882 if : >-
@@ -83,11 +87,11 @@ jobs:
8387 run : |
8488 $tags = @"
8589 ${{ steps.tags.outputs.tags }}
86- "@ -split "`n" | Where -Object { $_.Trim() }
90+ "@ -split "`n" | ForEach -Object { $_.Trim() } | Where-Object { $_ }
8791
8892 foreach ($tag in $tags) {
89- Write-Host "Pushing $($ tag.Trim()) "
90- docker push $tag.Trim()
93+ Write-Host "Pushing $tag"
94+ docker push $tag
9195 }
9296
9397 - name : Output image details
You can’t perform that action at this time.
0 commit comments