Fix security of ROCm labeling workflow (#55157)
Summary:
The current workflow fails when there are backticks in the PR title, because bash tries to evaluate it right away. (example: https://github.com/pytorch/pytorch/runs/2242913870) Moving the variables to the env section away from bash, which removes the security risk.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/55157
Test Plan: my repo: https://github.com/janeyx99/gha-experiments/actions/runs/709088679
Reviewed By: gchanan
Differential Revision: D27505033
Pulled By: janeyx99
fbshipit-source-id: 1cc7545c18400d63a4490d9b019afe383b272229