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

Support for Test Conda Token #4530

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 12 additions & 2 deletions .github/workflows/build_conda_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ on:
type: string
secrets:
CONDA_PYTORCHBOT_TOKEN:
description: "Access Token needed to upload binaries to anaconda"
description: "Access Token needed to upload binaries to anaconda nightly channel"
required: false
CONDA_PYTORCHBOT_TOKEN_TEST:
description: "Access Token needed to upload binaries to anaconda test channel"
required: false

jobs:
Expand Down Expand Up @@ -194,12 +197,19 @@ jobs:
working-directory: ${{ inputs.repository }}
env:
CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }}
CONDA_PYTORCHBOT_TOKEN_TEST: ${{ secrets.CONDA_PYTORCHBOT_TOKEN_TEST }}
run: |
if [[ "${CHANNEL}" = "nightly" ]]; then
export CONDA_TOKEN="${CONDA_PYTORCHBOT_TOKEN}"
else
export CONDA_TOKEN="${CONDA_PYTORCHBOT_TOKEN_TEST}"
fi

set -euxo pipefail
source "${BUILD_ENV_FILE}"
${CONDA_RUN} conda install --yes --quiet anaconda-client
${CONDA_RUN} anaconda \
-t "${CONDA_PYTORCHBOT_TOKEN}" \
-t "${CONDA_TOKEN}" \
upload distr/linux-64/*.tar.bz2 \
-u "pytorch-${CHANNEL}" \
--label main \
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/build_conda_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ on:
type: string
secrets:
CONDA_PYTORCHBOT_TOKEN:
description: "Access Token needed to upload binaries to anaconda"
description: "Access Token needed to upload binaries to anaconda nightly channel"
required: false
CONDA_PYTORCHBOT_TOKEN_TEST:
description: "Access Token needed to upload binaries to anaconda test channel"
required: false

jobs:
Expand Down Expand Up @@ -202,7 +205,14 @@ jobs:
working-directory: ${{ inputs.repository }}
env:
CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }}
CONDA_PYTORCHBOT_TOKEN_TEST: ${{ secrets.CONDA_PYTORCHBOT_TOKEN_TEST }}
run: |
if [[ "${CHANNEL}" = "nightly" ]]; then
export CONDA_TOKEN="${CONDA_PYTORCHBOT_TOKEN}"
else
export CONDA_TOKEN="${CONDA_PYTORCHBOT_TOKEN_TEST}"
fi

set -euxo pipefail
source "${BUILD_ENV_FILE}"

Expand All @@ -214,7 +224,7 @@ jobs:
export ARCH_NAME="osx-64"
fi
${CONDA_RUN} anaconda \
-t "${CONDA_PYTORCHBOT_TOKEN}" \
-t "${CONDA_TOKEN}" \
upload "distr/${ARCH_NAME}"/*.tar.bz2 \
-u "pytorch-${CHANNEL}" \
--label main \
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/build_conda_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ on:
type: string
secrets:
CONDA_PYTORCHBOT_TOKEN:
description: "Access Token needed to upload binaries to anaconda"
description: "Access Token needed to upload binaries to anaconda nightly channel"
required: false
CONDA_PYTORCHBOT_TOKEN_TEST:
description: "Access Token needed to upload binaries to anaconda test channel"
required: false

jobs:
Expand Down Expand Up @@ -225,12 +228,19 @@ jobs:
env:
PACKAGE_NAME: ${{ inputs.package-name }}
CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }}
CONDA_PYTORCHBOT_TOKEN_TEST: ${{ secrets.CONDA_PYTORCHBOT_TOKEN_TEST }}
run: |
if [[ "${CHANNEL}" = "nightly" ]]; then
export CONDA_TOKEN="${CONDA_PYTORCHBOT_TOKEN}"
else
export CONDA_TOKEN="${CONDA_PYTORCHBOT_TOKEN_TEST}"
fi

set -euxo pipefail
source "${BUILD_ENV_FILE}"
${CONDA_RUN} conda install --yes --quiet anaconda-client
${CONDA_RUN} anaconda \
-t "${CONDA_PYTORCHBOT_TOKEN}" \
-t "${CONDA_TOKEN}" \
upload "distr/win-64/${PACKAGE_NAME}*.tar.bz2" \
-u "pytorch-${CHANNEL}" \
--label main \
Expand Down
Loading