0

If I have something like this in a job on GitHub Actions as part of my workflow,

run: |
  echo this >> that
  echo the other

what shell does GitHub Actions use?

3
  • 1
    GitHub Actions uses different shells depending on the OS that is mentioned in the runs-on field. You can refer to this article to learn more about shells. If this doesn't answer your question, please add more detail by editing your question. Commented Nov 21, 2024 at 3:34
  • @Ajay I answered it below. Thanks though. Commented Nov 25, 2024 at 2:59
  • @Ajay I don't normally read dev.to, but that blog is pretty solid. Commented Nov 25, 2024 at 3:00

1 Answer 1

0

Default Shells for Windows, and non-Windows

  • On Windows it sources pwsh.
  • On other platforms it sources an sh derivative, but bash firstly if the runner provides it.

Source: The Runner's ScriptHandler.cs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.