Commit 841f5b1 1 parent 0c8ad3d commit 841f5b1 Copy full SHA for 841f5b1
File tree 1 file changed +48
-0
lines changed
1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build Windows AMI
2
+
3
+ on :
4
+ pull_request :
5
+ workflow_dispatch :
6
+ inputs :
7
+ branch :
8
+ description : ' pytorch/test-infra branch to build from. (default: main)'
9
+ required : true
10
+ default : ' main'
11
+ skip_create_ami :
12
+ description : ' Skip creating the AMI (default: false)'
13
+ required : true
14
+ default : false
15
+
16
+ permissions :
17
+ id-token : write
18
+ contents : read
19
+
20
+ env :
21
+ PACKER_VERSION : " 1.11.2"
22
+
23
+ jobs :
24
+ build-windows-ami :
25
+ runs-on : ubuntu-latest
26
+ environment : packer-build-env
27
+ steps :
28
+ - uses : actions/checkout@v4
29
+ with :
30
+ repository : pytorch/test-infra
31
+ ref : ${{ inputs.branch }}
32
+
33
+ - name : Configure AWS Credentials (PyTorch Account)
34
+ uses : aws-actions/configure-aws-credentials@v3
35
+ with :
36
+ aws-region : us-east-1
37
+ role-to-assume : arn:aws:iam::391835788720:role/gha-packer-role
38
+
39
+ - name : Setup Packer
40
+ uses : hashicorp/setup-packer@main
41
+ with :
42
+ version : ${{ env.PACKER_VERSION }}
43
+
44
+ - name : Packer Build
45
+ run : |
46
+ cd aws/ami/windows
47
+ packer init .
48
+ packer build -var 'skip_create_ami=${{ inputs.skip_create_ami }}' .
You can’t perform that action at this time.
0 commit comments