Skip to content

Commit

Permalink
[oidc] switch text wheels to oidc (#2220)
Browse files Browse the repository at this point in the history
* [oidc] switch text wheels to oidc

* Grant id-token write permission

* Update build-wheels-m1.yml

* Update build-wheels-macos.yml

* Update build-wheels-windows.yml

---------

Co-authored-by: Huy Do <[email protected]>
  • Loading branch information
atalman and huydhn authored Jan 13, 2024
1 parent dc94b32 commit 2c5e344
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build-wheels-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch:

permissions:
id-token: write
contents: read

jobs:
generate-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
Expand Down Expand Up @@ -46,9 +50,4 @@ jobs:
post-script: ${{ matrix.post-script }}
package-name: ${{ matrix.package-name }}
smoke-test-script: ${{ matrix.smoke-test-script }}
# Using "development" as trigger event so these binaries are not uploaded
# to official channels yet
trigger-event: ${{ github.event_name }}
secrets:
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}
9 changes: 4 additions & 5 deletions .github/workflows/build-wheels-m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch:

permissions:
id-token: write
contents: read

jobs:
generate-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
Expand Down Expand Up @@ -45,9 +49,4 @@ jobs:
package-name: ${{ matrix.package-name }}
smoke-test-script: ${{ matrix.smoke-test-script }}
runner-type: macos-m1-12
# Using "development" as trigger event so these binaries are not uploaded
# to official channels yet
trigger-event: ${{ github.event_name }}
secrets:
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}
9 changes: 4 additions & 5 deletions .github/workflows/build-wheels-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch:

permissions:
id-token: write
contents: read

jobs:
generate-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
Expand Down Expand Up @@ -45,9 +49,4 @@ jobs:
package-name: ${{ matrix.package-name }}
smoke-test-script: ${{ matrix.smoke-test-script }}
runner-type: macos-12
# Using "development" as trigger event so these binaries are not uploaded
# to official channels yet
trigger-event: ${{ github.event_name }}
secrets:
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}
7 changes: 4 additions & 3 deletions .github/workflows/build-wheels-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch:

permissions:
id-token: write
contents: read

jobs:
generate-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
Expand Down Expand Up @@ -48,6 +52,3 @@ jobs:
package-name: ${{ matrix.package-name }}
smoke-test-script: ${{ matrix.smoke-test-script }}
trigger-event: ${{ github.event_name }}
secrets:
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}

0 comments on commit 2c5e344

Please sign in to comment.