Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite aws configure credentials without the using aws-actions/configure-aws-credentials. Use actions/checkout@v4 for manylinx 2.28 builds #5968

Merged
merged 5 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions .github/actions/binary-upload/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,39 @@ inputs:
runs:
using: composite
steps:

- name: Configure aws credentials (pytorch account)
if: ${{ inputs.trigger-event == 'schedule' || (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) }}
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_nightly_build_wheels
aws-region: us-east-1
env:
AWS_WEB_IDENTITY_TOKEN_FILE: aws.web.identity.token.file
AWS_DEFAULT_REGION: us-east-1
AWS_ROLE_ARN: arn:aws:iam::749337293305:role/gha_workflow_nightly_build_wheels
shell: bash
run: |
set -euxo pipefail
pip install awscli==1.32.18
yum install -y jq
sleep 3 # Need to have a delay to acquire this
curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=sts.amazonaws.com" \
| jq -r '.value' > "${AWS_WEB_IDENTITY_TOKEN_FILE}"

- name: Configure aws credentials (pytorch account)
if: ${{ env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/v') }}
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_test_build_wheels
aws-region: us-east-1
env:
AWS_WEB_IDENTITY_TOKEN_FILE: aws.web.identity.token.file
AWS_DEFAULT_REGION: us-east-1
AWS_ROLE_ARN: arn:aws:iam::749337293305:role/gha_workflow_test_build_wheels
shell: bash
run: |
set -euxo pipefail
pip install awscli==1.32.18
yum install -y jq
sleep 3 # Need to have a delay to acquire this
curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=sts.amazonaws.com" \
| jq -r '.value' > "${AWS_WEB_IDENTITY_TOKEN_FILE}"


- name: Nightly or release RC
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/')) }}
Expand All @@ -45,8 +65,6 @@ runs:
# shellcheck disable=SC1090
source "${BUILD_ENV_FILE}"

pip install awscli==1.32.18

AWS_CMD="aws s3 cp --dryrun"
if [[ "${NIGHTLY_OR_TEST:-0}" == "1" ]]; then
AWS_CMD="aws s3 cp"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_build_wheels_linux_with_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- .github/actions/setup-binary-builds/action.yml
- .github/actions/binary-upload/action.yml
- .github/workflows/test_build_wheels_linux.yml
- .github/workflows/build_wheels_linux.yml
- .github/workflows/generate_binary_build_matrix.yml
Expand Down
Loading