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

Add conda token for test channel #472

Closed
wants to merge 1 commit into from
Closed
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
13 changes: 10 additions & 3 deletions .github/workflows/_build_test_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ on:
required: false
CONDA_PYTORCHBOT_TOKEN:
required: false
CONDA_TEST_PYTORCHBOT_TOKEN:
required: false
CONDA_NIGHTLY_PYTORCHBOT_TOKEN:
required: false

Expand Down Expand Up @@ -298,8 +300,13 @@ jobs:

if [[ ${{ needs.get_release_type.outputs.type }} == 'official' ]]; then
CONDA_CHANNEL=pytorch
CONDA_TOKEN=${CONDA_PYTORCHBOT_TOKEN}
elif [[ ${{ needs.get_release_type.outputs.type }} == 'test' ]]; then
CONDA_CHANNEL=pytorch-${{ needs.get_release_type.outputs.type }}
CONDA_TOKEN=${CONDA_TEST_PYTORCHBOT_TOKEN}
else
CONDA_CHANNEL=pytorch-${{ needs.get_release_type.outputs.type }}
CONDA_TOKEN=${CONDA_NIGHTLY_PYTORCHBOT_TOKEN}
fi

if [[ ${{ needs.get_release_type.outputs.type }} == 'nightly' ]]; then
Expand All @@ -316,7 +323,7 @@ jobs:
for new_package in ./$subdir/torchdata-*-$build.tar.bz2; do
if [[ -f "$new_package" ]]; then
echo "Removing $CONDA_CHANNEL/torchdata/$version/$subdir/torchdata-$version-$build.tar.bz2"
anaconda -t "${CONDA_NIGHTLY_PYTORCHBOT_TOKEN}" remove -f "$CONDA_CHANNEL/torchdata/$version/$subdir/torchdata-$version-$build.tar.bz2"
anaconda -t "${CONDA_TOKEN}" remove -f "$CONDA_CHANNEL/torchdata/$version/$subdir/torchdata-$version-$build.tar.bz2"
break
fi
done
Expand All @@ -325,10 +332,10 @@ jobs:
fi
done
# Upload new conda packages per subdir
anaconda -t "${CONDA_NIGHTLY_PYTORCHBOT_TOKEN}" upload ./$subdir/torchdata-*.tar.bz2 -u "$CONDA_CHANNEL" --label main --no-progress --force
anaconda -t "${CONDA_TOKEN}" upload ./$subdir/torchdata-*.tar.bz2 -u "$CONDA_CHANNEL" --label main --no-progress --force
done
else
anaconda -t "${CONDA_PYTORCHBOT_TOKEN}" upload ./*/torchdata-*.tar.bz2 -u "$CONDA_CHANNEL" --label main --no-progress --force
anaconda -t "${CONDA_TOKEN}" upload ./*/torchdata-*.tar.bz2 -u "$CONDA_CHANNEL" --label main --no-progress --force
fi

build_docs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
secrets:
PYTORCH_BINARY_AWS_ACCESS_KEY_ID: ${{ secrets.PYTORCH_BINARY_AWS_ACCESS_KEY_ID }}
PYTORCH_BINARY_AWS_SECRET_ACCESS_KEY: ${{ secrets.PYTORCH_BINARY_AWS_SECRET_ACCESS_KEY }}
CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }}
CONDA_TEST_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_TEST_PYTORCHBOT_TOKEN }}