It'd be useful to have a function in the toolkit core which allows to change the default shell for all the following steps in a job. Another solution is to allow to set shell at job level (as it is supported for env). However, I think that supporting it in the toolkit would still be useful.
@thboop, the scenario would a shell that is contributed by an action, which is a step. Hence, setting it at the job level would not work, because the shell is not available when the first steps in the job are evaluated (until the action that contributes the shell is executed).
Currently, since MSYS2 is not available yet, this is the use case of setup-msys2. However, I believe that it can have more uses. I agree that arbitrary actions changing the default shell can be confusing. But it should not if the purpose of the actions is precisely to provide a custom shell.