Skip to content

Commit

Permalink
Another attempt at fixing windows docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
dricross committed Jan 3, 2025
1 parent 21146fc commit bc0b413
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/test-build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit bc0b413

Please sign in to comment.