Skip to content

Commit b35cb82

Browse files
atalmanhuydhn
andauthored
[RELEASE-ONLY CHANGES] Branch Cut for Release 2.2 (#4868)
Co-authored-by: Huy Do <[email protected]>
1 parent 244a706 commit b35cb82

File tree

3 files changed

+54
-9
lines changed

3 files changed

+54
-9
lines changed

.github/workflows/build_wheels_linux.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ on:
6565
required: false
6666
type: boolean
6767
default: true
68+
# TODO (huydhn): Remove them once all libraries using Nova has removed them
6869
secrets:
6970
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID:
7071
description: "AWS Access Key passed from caller workflow"
@@ -73,6 +74,10 @@ on:
7374
description: "AWS Secret Access Ket passed from caller workflow"
7475
required: false
7576

77+
permissions:
78+
id-token: write
79+
contents: read
80+
7681
jobs:
7782
build:
7883
strategy:
@@ -224,13 +229,23 @@ jobs:
224229
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found"
225230
${CONDA_RUN} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
226231
fi
232+
# TODO (huydhn): Move the following step to a separate build job
233+
- name: Configure aws credentials (pytorch account)
234+
if: ${{ inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly') }}
235+
uses: aws-actions/configure-aws-credentials@v3
236+
with:
237+
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_nightly_build_wheels
238+
aws-region: us-east-1
239+
- name: Configure aws credentials (pytorch account)
240+
if: ${{ env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/') }}
241+
uses: aws-actions/configure-aws-credentials@v3
242+
with:
243+
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_test_build_wheels
244+
aws-region: us-east-1
227245
- name: Upload package to pytorch.org
228246
if: ${{ (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) || (env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/')) }}
229247
shell: bash -l {0}
230248
working-directory: ${{ inputs.repository }}
231-
env:
232-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
233-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}
234249
run: |
235250
set -euxo pipefail
236251
source "${BUILD_ENV_FILE}"

.github/workflows/build_wheels_macos.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ on:
5959
description: "The key created when saving a cache and the key used to search for a cache."
6060
default: ""
6161
type: string
62+
# TODO (huydhn): Remove them once all libraries using Nova has removed them
6263
secrets:
6364
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID:
6465
description: "AWS Access Key passed from caller workflow"
@@ -67,6 +68,10 @@ on:
6768
description: "AWS Secret Access Ket passed from caller workflow"
6869
required: false
6970

71+
permissions:
72+
id-token: write
73+
contents: read
74+
7075
jobs:
7176
build:
7277
strategy:
@@ -198,13 +203,23 @@ jobs:
198203
${CONDA_RUN} python3 "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
199204
fi
200205
export PATH=${OLD_PATH}
206+
# TODO (huydhn): Move the following step to a separate build job
207+
- name: Configure aws credentials (pytorch account)
208+
if: ${{ inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly') }}
209+
uses: aws-actions/configure-aws-credentials@v3
210+
with:
211+
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_nightly_build_wheels
212+
aws-region: us-east-1
213+
- name: Configure aws credentials (pytorch account)
214+
if: ${{ env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/') }}
215+
uses: aws-actions/configure-aws-credentials@v3
216+
with:
217+
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_test_build_wheels
218+
aws-region: us-east-1
201219
- name: Upload package to pytorch.org
202220
if: ${{ (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) || (env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/')) }}
203221
shell: bash -l {0}
204222
working-directory: ${{ inputs.repository }}
205-
env:
206-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
207-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}
208223
run: |
209224
set -euxo pipefail
210225
# shellcheck disable=SC1090

.github/workflows/build_wheels_windows.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ on:
5959
description: "The key created when saving a cache and the key used to search for a cache."
6060
default: ""
6161
type: string
62+
# TODO (huydhn): Remove them once all libraries using Nova has removed them
6263
secrets:
6364
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID:
6465
description: "AWS Access Key passed from caller workflow"
@@ -67,6 +68,10 @@ on:
6768
description: "AWS Secret Access Ket passed from caller workflow"
6869
required: false
6970

71+
permissions:
72+
id-token: write
73+
contents: read
74+
7075
jobs:
7176
build:
7277
strategy:
@@ -188,13 +193,23 @@ jobs:
188193
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found"
189194
${CONDA_RUN} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
190195
fi
196+
# TODO (huydhn): Move the following step to a separate build job
197+
- name: Configure aws credentials (pytorch account)
198+
if: ${{ inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly') }}
199+
uses: aws-actions/configure-aws-credentials@v3
200+
with:
201+
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_nightly_build_wheels
202+
aws-region: us-east-1
203+
- name: Configure aws credentials (pytorch account)
204+
if: ${{ env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/') }}
205+
uses: aws-actions/configure-aws-credentials@v3
206+
with:
207+
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_test_build_wheels
208+
aws-region: us-east-1
191209
- name: Upload package to pytorch.org
192210
if: ${{ (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) || (env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/')) }}
193211
shell: bash -l {0}
194212
working-directory: ${{ inputs.repository }}
195-
env:
196-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
197-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}
198213
run: |
199214
source "${BUILD_ENV_FILE}"
200215
${CONDA_RUN} pip install awscli

0 commit comments

Comments
 (0)