"docs/git@developer.sourcefind.cn:OpenDAS/lmdeploy.git" did not exist on "373bd01394cfa784a9ab3fe0d404d6ae1beee3d0"
Unverified Commit 5f6e22dc authored by Nikita Shulga's avatar Nikita Shulga Committed by GitHub
Browse files

Fix `if` condition for s3/conda uploads (#6146)

Replace `steps.extract_branch.outputs.branch` (which were probably taken from
https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions ) with straightforward `github.event.ref`

Tested in
https://github.com/malfet/deleteme/runs/6822647720?check_suite_focus=true and https://github.com/malfet/deleteme/runs/6822691158?check_suite_focus=true
parent d2486f6c
...@@ -79,7 +79,7 @@ jobs: ...@@ -79,7 +79,7 @@ jobs:
name: torchvision-py${{ matrix.py_vers }}-macos11-m1 name: torchvision-py${{ matrix.py_vers }}-macos11-m1
path: dist/ path: dist/
- name: Upload wheel to S3 - name: Upload wheel to S3
if: ${{ github.event_name == 'push' && (steps.extract_branch.outputs.branch == 'nightly' || startsWith(github.event.ref, 'refs/tags/')) }} if: ${{ github.event_name == 'push' && (github.event.ref == 'ref/heads/nightly' || startsWith(github.event.ref, 'refs/tags/')) }}
shell: arch -arch arm64 bash {0} shell: arch -arch arm64 bash {0}
env: env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
...@@ -139,7 +139,7 @@ jobs: ...@@ -139,7 +139,7 @@ jobs:
name: torchvision-py${{ matrix.py_vers }}-macos11-m1-conda name: torchvision-py${{ matrix.py_vers }}-macos11-m1-conda
path: dist/ path: dist/
- name: Upload package to conda - name: Upload package to conda
if: ${{ github.event_name == 'push' && steps.extract_branch.outputs.branch == 'nightly' }} if: ${{ github.event_name == 'push' && (github.event.ref == 'ref/heads/nightly' || startsWith(github.event.ref, 'refs/tags/')) }}
shell: arch -arch arm64 bash {0} shell: arch -arch arm64 bash {0}
env: env:
CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment