diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index f5748dc3..3d710d1c 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -609,7 +609,16 @@ jobs: - name: Build & push container run: | $params = @( - # Required build arguments + # Dockerfile location + "--file", "src/docker/Dockerfile-${{ matrix.os }}" + + # Network fix + # See: https://github.com/GoogleContainerTools/skaffold/issues/1771#issuecomment-800288547 + # See: https://stackoverflow.com/a/63385154 + # See: https://stackoverflow.com/a/73704138 + "--network", "host" + + # Build arguments "--build-arg", "AWS_CLI_VERSION=${{ env.AWS_CLI_VERSION }}", "--build-arg", "AZP_AGENT_VERSION=${{ env.AZP_AGENT_VERSION }}", "--build-arg", "AZURE_CLI_VERSION=${{ env.AZURE_CLI_VERSION }}", @@ -622,20 +631,21 @@ jobs: "--build-arg", "VS_BUILDTOOLS_VERSION=${{ env.VS_BUILDTOOLS_WIN_VERSION }}", "--build-arg", "YQ_VERSION=${{ env.YQ_VERSION }}", "--build-arg", "ZSTD_VERSION=${{ env.ZSTD_WIN_VERSION }}", - - "--file", "src/docker/Dockerfile-${{ matrix.os }}" ) + # Output tags $tags = ('${{ steps.meta.outputs.tags }}').Split([Environment]::NewLine) foreach ($tag in $tags) { $params += "--tag", $tag } + # Output labels $labels = ('${{ steps.meta.outputs.labels }}').Split([Environment]::NewLine) foreach ($label in $labels) { $params += "--label", $label } + # Debug arguments to console Write-Host "Build arguments:" $params | ForEach-Object -Begin { $i = 0 } -Process { if ($i % 2 -eq 0) { @@ -647,9 +657,11 @@ jobs: } Write-Host + # Build Write-Host "Building" docker build @params src\docker + # Push Write-Host "Pushing" foreach ($tag in $tags) { docker push --quiet $tag