actionlint
actionlint copied to clipboard
Any program on `$PATH` can be a `shell`
actionlint only accepts bash, pwsh, python, and sh as valid shell names, but GitHub lets you use any executable on $PATH as a shell.
.github/workflows/example.yml:58:16: shell name "nix develop" is invalid. available names are "bash", "pwsh", "python", "sh" [shell-name]
|
58 | shell: nix develop
| ^~~
Perhaps there should be an additional configurable allowlist for shell names, like the self-hosted-runner.labels key.
See: "TIL: Any program can be a GitHub Actions shell" by William Woodruff
The contract is a bit narrower than the blog post implies; the shell has to contain {0}.
Error: Invalid shell option. Shell must be a valid built-in (bash, sh, cmd, powershell, pwsh) or a format string containing '{0}'