Fix triton upload channel detection (#108291)
This should be nightly for nightly and test for release candidates. There are 2 bugs:
* The shell needs to set to `bash` explicitly, otherwise, GHA uses `sh` which doesn't recognized `[[` as shown in https://github.com/pytorch/pytorch/actions/runs/6030476858/job/16362717792#step:6:10
*`${GITHUB_REF_NAME}` is un-quoted. This is basically https://www.shellcheck.net/wiki/SC2248 but this wasn't captured by actionlint, and shellcheck doesn't work with workflow YAML file. I will think about how to add a lint rule for this later then.
### Testing
https://github.com/pytorch/pytorch/actions/runs/6031330411 to confirm that setting the channel is performed correctly.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108291
Approved by: https://github.com/osalpekar, https://github.com/atalman