diff --git a/.github/workflows/build-windows-ami.yml b/.github/workflows/build-windows-ami.yml index e9dedb3bca..60799b14fa 100644 --- a/.github/workflows/build-windows-ami.yml +++ b/.github/workflows/build-windows-ami.yml @@ -45,3 +45,29 @@ jobs: cd aws/ami/windows packer init . PACKER_LOG=1 packer build -var 'skip_create_ami=${{ inputs.skip_create_ami }}' . + + build-windows-ami-pytorch-account: + runs-on: ubuntu-latest + environment: packer-build-env + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + repository: pytorch/test-infra + ref: ${{ inputs.branch }} + + - name: Configure AWS Credentials (PyTorch Account) + uses: aws-actions/configure-aws-credentials@50ac8dd1e1b10d09dac7b8727528b91bed831ac0 # v3.0.2 + with: + aws-region: us-east-1 + role-to-assume: arn:aws:iam::308535385114:role/gha_workflow_build_packer_ami + + - name: Setup Packer + uses: hashicorp/setup-packer@76e3039aa951aa4e6efe7e6ee06bc9ceb072142d # main + with: + version: ${{ env.PACKER_VERSION }} + + - name: Packer Build + run: | + cd aws/ami/windows + packer init . + PACKER_LOG=1 packer build -var 'skip_create_ami=${{ inputs.skip_create_ami }}' . diff --git a/aws/ami/windows/windows.pkr.hcl b/aws/ami/windows/windows.pkr.hcl index 259416f80d..361c4c0a7e 100644 --- a/aws/ami/windows/windows.pkr.hcl +++ b/aws/ami/windows/windows.pkr.hcl @@ -1,6 +1,6 @@ data "amazon-ami" "windows_root_ami" { filters = { - name = "Windows_Server-2019-English-Tesla-*" + name = "Windows_Server-2019-English-Full-Base-*" root-device-type = "ebs" virtualization-type = "hvm" }