Skip to content

Commit

Permalink
Automate passing conda-pytorchbot-token-test for release (pytorch#111821
Browse files Browse the repository at this point in the history
)

<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at a3b51df</samp>

This pull request adds support for testing binary uploads to Anaconda Cloud using different tokens and channels based on the branch name. It modifies the `.github/workflows/_binary-upload.yml` workflow and several other workflows that use the `.github/templates/upload.yml.j2` template. It also adds a new secret variable `conda-pytorchbot-token-test` to store the test token.

Pull Request resolved: pytorch#111821
Approved by: https://github.com/osalpekar, https://github.com/huydhn
  • Loading branch information
atalman authored and Skylion007 committed Nov 14, 2023
1 parent 2b5b361 commit af0ef04
Show file tree
Hide file tree
Showing 16 changed files with 156 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/templates/upload.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@
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 }}
conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }}
conda-pytorchbot-token-test: ${{ secrets.CONDA_PYTORCHBOT_TOKEN_TEST }}
uses: ./.github/workflows/_binary-upload.yml
{%- endmacro %}
12 changes: 11 additions & 1 deletion .github/workflows/_binary-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ on:
conda-pytorchbot-token:
required: true
description: Conda PyTorchBot token
conda-pytorchbot-token-test:
required: true
description: Conda PyTorchBot token
jobs:
build:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -127,14 +130,21 @@ jobs:
- name: Upload binaries
if: steps.download-artifacts.outcome && steps.download-artifacts.outcome == 'success'
shell: bash
env:
PKG_DIR: "${{ runner.temp }}/artifacts"
UPLOAD_SUBFOLDER: "${{ env.DESIRED_CUDA }}"
# When running these on pull_request events these should be blank
AWS_ACCESS_KEY_ID: ${{ secrets.aws-pytorch-uploader-access-key-id }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws-pytorch-uploader-secret-access-key }}
ANACONDA_API_TOKEN: ${{ secrets.conda-pytorchbot-token }}
CONDA_PYTORCHBOT_TOKEN: ${{ secrets.conda-pytorchbot-token }}
CONDA_PYTORCHBOT_TOKEN_TEST: ${{ secrets.conda-pytorchbot-token-test }}
BUILD_NAME: ${{ inputs.build_name }}
run: |
set -ex
if [[ "${GITHUB_REF_NAME}" = *-rc[0-9]* ]]; then
export ANACONDA_API_TOKEN="${CONDA_PYTORCHBOT_TOKEN_TEST}"
else
export ANACONDA_API_TOKEN="${CONDA_PYTORCHBOT_TOKEN}"
fi
bash .circleci/scripts/binary_upload.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .github/workflows/generated-linux-binary-conda-nightly.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit af0ef04

Please sign in to comment.