Skip to content

Commit f83795d

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Fix if condition for s3/conda uploads (#6146)
Summary: 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 Reviewed By: datumbox Differential Revision: D37212652 fbshipit-source-id: 5609bc0fccf11faf233f7d9f759046ad89dd520c
1 parent cb3d405 commit f83795d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build-m1-binaries.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
name: torchvision-py${{ matrix.py_vers }}-macos11-m1
8080
path: dist/
8181
- name: Upload wheel to S3
82-
if: ${{ github.event_name == 'push' && (steps.extract_branch.outputs.branch == 'nightly' || startsWith(github.event.ref, 'refs/tags/')) }}
82+
if: ${{ github.event_name == 'push' && (github.event.ref == 'ref/heads/nightly' || startsWith(github.event.ref, 'refs/tags/')) }}
8383
shell: arch -arch arm64 bash {0}
8484
env:
8585
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
@@ -139,7 +139,7 @@ jobs:
139139
name: torchvision-py${{ matrix.py_vers }}-macos11-m1-conda
140140
path: dist/
141141
- name: Upload package to conda
142-
if: ${{ github.event_name == 'push' && steps.extract_branch.outputs.branch == 'nightly' }}
142+
if: ${{ github.event_name == 'push' && (github.event.ref == 'ref/heads/nightly' || startsWith(github.event.ref, 'refs/tags/')) }}
143143
shell: arch -arch arm64 bash {0}
144144
env:
145145
CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }}

0 commit comments

Comments
 (0)