Skip to content

Run ShellCheck on scripts in GitHub Actions workflows #55314

@samestep

Description

@samestep

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

  1. they might contain GitHub Actions expressions ${{ <expression> }}
  2. 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions