workflows: use bash shell explicitly

This forces better error handling as described in [1].

Without this change, bash would *not* run with `-o pipefail`, which
means some errors go unnoticed. By naming `bash` explicitly, `-o
pipefail` is enabled.

1:
https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell
This commit is contained in:
Wolfgang Walther 2025-06-10 21:59:31 +02:00
parent c4949d642c
commit 0f5e504f9e
No known key found for this signature in database
GPG Key ID: B39893FA5F65CAE1
19 changed files with 76 additions and 0 deletions

View File

@ -14,6 +14,10 @@ permissions:
issues: write
pull-requests: write
defaults:
run:
shell: bash
jobs:
backport:
name: Backport Pull Request

View File

@ -17,6 +17,10 @@ concurrency:
permissions:
pull-requests: write
defaults:
run:
shell: bash
jobs:
check:
name: cherry-pick-check

View File

@ -12,6 +12,10 @@ concurrency:
permissions: {}
defaults:
run:
shell: bash
jobs:
nixos:
name: fmt-check

View File

@ -15,6 +15,10 @@ concurrency:
permissions: {}
defaults:
run:
shell: bash
jobs:
shell-check:
strategy:

View File

@ -35,6 +35,10 @@ concurrency:
permissions: {}
defaults:
run:
shell: bash
env:
OWNERS_FILE: ci/OWNERS
# Don't do anything on draft PRs

View File

@ -22,6 +22,10 @@ concurrency:
permissions: {}
defaults:
run:
shell: bash
jobs:
base:
name: Trigger jobs

View File

@ -12,6 +12,10 @@ concurrency:
permissions: {}
defaults:
run:
shell: bash
jobs:
eval-aliases:
name: Eval nixpkgs with aliases enabled

View File

@ -22,6 +22,10 @@ concurrency:
permissions: {}
defaults:
run:
shell: bash
jobs:
prepare:
name: Prepare

View File

@ -17,6 +17,10 @@ permissions:
issues: write # needed to create *new* labels
pull-requests: write
defaults:
run:
shell: bash
jobs:
labels:
name: label-pr

View File

@ -15,6 +15,10 @@ concurrency:
permissions: {}
defaults:
run:
shell: bash
jobs:
nixpkgs-lib-tests:
name: nixpkgs-lib-tests

View File

@ -24,6 +24,10 @@ concurrency:
permissions: {}
defaults:
run:
shell: bash
jobs:
nixos:
name: nixos-manual-build

View File

@ -16,6 +16,10 @@ concurrency:
permissions: {}
defaults:
run:
shell: bash
jobs:
nixpkgs:
name: nixpkgs-manual-build

View File

@ -12,6 +12,10 @@ concurrency:
permissions: {}
defaults:
run:
shell: bash
jobs:
tests:
name: nix-files-parseable-check

View File

@ -20,6 +20,10 @@ permissions: {}
# We don't use a concurrency group here, because the action is triggered quite often (due to the PR edit trigger), and contributors would get notified on any canceled run.
# There is a feature request for suppressing notifications on concurrency-canceled runs: https://github.com/orgs/community/discussions/13015
defaults:
run:
shell: bash
jobs:
check:
name: nixpkgs-vet

View File

@ -8,6 +8,10 @@ on:
permissions: {}
defaults:
run:
shell: bash
jobs:
fail:
if: |

View File

@ -16,6 +16,10 @@ on:
permissions: {}
defaults:
run:
shell: bash
jobs:
periodic-merge:
if: github.repository_owner == 'NixOS'

View File

@ -16,6 +16,10 @@ on:
permissions: {}
defaults:
run:
shell: bash
jobs:
periodic-merge:
if: github.repository_owner == 'NixOS'

View File

@ -12,6 +12,10 @@ on:
required: true
type: string
defaults:
run:
shell: bash
jobs:
merge:
runs-on: ubuntu-24.04-arm

View File

@ -22,6 +22,10 @@ concurrency:
permissions: {}
defaults:
run:
shell: bash
jobs:
request:
name: Request