Currently we run ShellCheck in GitHub Actions on all our *.sh
scripts in .jenkins/pytorch
. However, it'd be nice to also check the shell scripts embedded in our .github/workflows/*.yml
files.
Strictly speaking, we can't just pull out the contents of run:
blocks and run ShellCheck on them, because
- they might contain GitHub Actions expressions
${{ <expression> }}
- they might use a different shell besides
bash
However, judging from #55157, it seems like we could/should use a preprocessing step that simply forbids the first situation, and use a bit of logic (based on whether the platform is Windows, and the presence of the shell
key) to resolve the second.