@@ -15,19 +15,39 @@ inputs:
15
15
runs :
16
16
using : composite
17
17
steps :
18
+
18
19
- name : Configure aws credentials (pytorch account)
19
20
if : ${{ inputs.trigger-event == 'schedule' || (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) }}
20
- uses : aws-actions/configure-aws-credentials@v3
21
- with :
22
- role-to-assume : arn:aws:iam::749337293305:role/gha_workflow_nightly_build_wheels
23
- aws-region : us-east-1
21
+ env :
22
+ AWS_WEB_IDENTITY_TOKEN_FILE : aws.web.identity.token.file
23
+ AWS_DEFAULT_REGION : us-east-1
24
+ AWS_ROLE_ARN : arn:aws:iam::749337293305:role/gha_workflow_nightly_build_wheels
25
+ shell : bash
26
+ run : |
27
+ set -euxo pipefail
28
+ pip install awscli==1.32.18
29
+ yum install -y jq
30
+ sleep 3 # Need to have a delay to acquire this
31
+ curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
32
+ "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=sts.amazonaws.com" \
33
+ | jq -r '.value' > "${AWS_WEB_IDENTITY_TOKEN_FILE}"
24
34
25
35
- name : Configure aws credentials (pytorch account)
26
36
if : ${{ env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/v') }}
27
- uses : aws-actions/configure-aws-credentials@v3
28
- with :
29
- role-to-assume : arn:aws:iam::749337293305:role/gha_workflow_test_build_wheels
30
- aws-region : us-east-1
37
+ env :
38
+ AWS_WEB_IDENTITY_TOKEN_FILE : aws.web.identity.token.file
39
+ AWS_DEFAULT_REGION : us-east-1
40
+ AWS_ROLE_ARN : arn:aws:iam::749337293305:role/gha_workflow_test_build_wheels
41
+ shell : bash
42
+ run : |
43
+ set -euxo pipefail
44
+ pip install awscli==1.32.18
45
+ yum install -y jq
46
+ sleep 3 # Need to have a delay to acquire this
47
+ curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
48
+ "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=sts.amazonaws.com" \
49
+ | jq -r '.value' > "${AWS_WEB_IDENTITY_TOKEN_FILE}"
50
+
31
51
32
52
- name : Nightly or release RC
33
53
if : ${{ inputs.trigger-event == 'schedule' || (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) || (env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/')) }}
44
64
45
65
# shellcheck disable=SC1090
46
66
source "${BUILD_ENV_FILE}"
47
-
48
67
pip install awscli==1.32.18
49
68
50
69
AWS_CMD="aws s3 cp --dryrun"
0 commit comments