Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions: use explicit bash shell & other defaults #6654

Draft
wants to merge 1 commit into
base: 8.4.x
Choose a base branch
from

Conversation

MetRonnie
Copy link
Member

@MetRonnie MetRonnie commented Mar 5, 2025

https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell

Supported platform shell parameter Description Command run internally
Linux / macOS unspecified The default shell on non-Windows platforms. Note that this runs a different command to when bash is specified explicitly. If bash is not found in the path, this is treated as sh. bash -e {0}
All bash The default shell on non-Windows platforms with a fallback to sh. When specifying a bash shell on Windows, the bash shell included with Git for Windows is used. bash --noprofile --norc -eo pipefail {0}

This was added to the docs in actions/runner#1955; I was unaware that there was a difference between not specifying the default and specifying bash.

We seem to be missing -o pipefail by default. (This change will also introduce --norc, --noprofile; not sure why these are included 🤷)

Tip

If/when we change to using setup-micromamba/miniconda, we will need to provide the full set of options we want, which will have to include -l.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • No dependency changes
  • tests, docs, etc not needed
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@MetRonnie MetRonnie added small infrastructure GH Actions, Codecov etc. labels Mar 5, 2025
@MetRonnie MetRonnie self-assigned this Mar 5, 2025
@oliver-sanders
Copy link
Member

oliver-sanders commented Mar 5, 2025

Will be revoked by #6655

Looking into how/if micromamba-shell handles this.

@MetRonnie MetRonnie marked this pull request as draft March 11, 2025 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure GH Actions, Codecov etc. small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants