diff --git a/.github/workflows/test-build-docker.yml b/.github/workflows/test-build-docker.yml index ffaad58611..8061549f99 100644 --- a/.github/workflows/test-build-docker.yml +++ b/.github/workflows/test-build-docker.yml @@ -246,17 +246,28 @@ jobs: ContainerRepositoryNameAndTag: ${{ inputs.ContainerRepositoryNameAndTag }} run: | $splitArray = $env:ContainerRepositoryNameAndTag.Split(":")[0] - Write-Output "::set-output name=ContainerRepositoryName::$splitArray" + echo $splitArray + echo "ContainerRepositoryName=$splitArray" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Get ECR Repo tag + id: repo_tag + env: + ContainerRepositoryNameAndTag: ${{ inputs.ContainerRepositoryNameAndTag }} + run: | + $splitArray = $env:ContainerRepositoryNameAndTag.Split(":")[1] + echo $splitArray + echo "ImageTag=$splitArray" | Out-File -FilePath $env:GITHUB_ENV -Append - name: Build Windows Cloudwatch Agent Image env: REGISTRY: ${{ steps.login-ecr.outputs.registry }} - REPOSITORY: ${{ steps.repo_name.outputs.ContainerRepositoryName }}:2022 if: contains(inputs.BucketKey, 'test') == false || steps.cached_msi.outputs.cache-hit == false run: | - Write-Output "$env:REGISTRY/$env:REPOSITORY" - docker build --platform windows/amd64 -f ./amazon-cloudwatch-container-insights/cloudwatch-agent-dockerfile/localmsi/Dockerfile.Windows . -t $env:REPOSITORY - docker push $env:REGISTRY/$env:REPOSITORY + echo "Registry: $env:REGISTRY" + echo "Repository: $env:ContainerRepositoryName" + echo "Image Tag: $env:ImageTag" + docker build --platform windows/amd64 -f ./amazon-cloudwatch-container-insights/cloudwatch-agent-dockerfile/localmsi/Dockerfile.Windows . -t $env:ImageTag-2022 + docker push ${{ env.REGISTRY }}/${{ env.ContainerRepositoryName }}:${{ env.ImageTag }}-2022 BuildMSI-2019: name: 'BuildMSI-2019'