Set an explicit GitHub Actions shell #393
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Setting an explicit bash shell ensures GitHub Actions enables pipefail mode too, rather than only error on exit (due to GitHub Actions slightly counter-intuitive choice of settings):
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
This is important for UX since this workflow uses pipes.
For example, without this change, if the
docker save
command here fails, then the piping to zstd otherwise continues, resulting in an empty exported images archive that will only fail much later in the build when the archive isdocker load
ed:https://github.com/heroku/builder/actions/runs/6303703122/job/17113579563?pr=392#step:5:7
This shell is set globally, to avoid needing to specify it for every job or run command:
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
GUS-W-14181209.