actionlint
actionlint copied to clipboard
Warning if explicit shell is not set
I've encountered that github actions uses sh as the shell even when bash is on the worker image, unless shell: bash is explicitly added, either for the step or using the defaults https://docs.github.com/en/actions/using-jobs/setting-default-values-for-jobs#example-set-the-default-shell-and-working-directory
IMO it would be useful for actionlint to check whether there is an explicit shell set for any step which uses run, so that the language for the script is known.
Here's evidence of this issue:
- name: Print default shell
run: |
ps -p $$
- name: Print bash shell
shell: bash
run: |
ps -p $$
This is a real issue.