From c03ba3c20aba3a53cd6d8172c52179eee193f6a4 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Sat, 21 Sep 2024 03:07:03 +0800 Subject: [PATCH] workflows: use `set -xeuo pipefail` globally This makes it easier to avoid subtle shell script bugs. --- .github/workflows/actionlint.yml | 4 ++++ .github/workflows/autogenerated-files.yml | 4 ++++ .github/workflows/codeql-analysis.yml | 4 ++++ .github/workflows/docker.yml | 6 +++++- .github/workflows/docs.yml | 6 ++++-- .github/workflows/doctor.yml | 7 +++++++ .github/workflows/pkg-installer.yml | 5 +++++ .github/workflows/rubydoc.yml | 4 ++++ .github/workflows/schemas.yml | 4 ++++ .github/workflows/sorbet.yml | 4 ++++ .github/workflows/spdx.yml | 4 ++++ .github/workflows/sponsors-maintainers-man-completions.yml | 4 ++++ .github/workflows/stale-issues.yml | 4 ++++ .github/workflows/tests.yml | 6 +++++- .github/workflows/vendor-gems.yml | 4 ++++ .github/workflows/vendor-version.yml | 4 ++++ 16 files changed, 70 insertions(+), 4 deletions(-) diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 08a070c6aec4b..3be5a69e57e13 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -18,6 +18,10 @@ env: HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_ENV_HINTS: 1 +defaults: + run: + shell: bash -xeuo pipefail {0} + concurrency: group: "actionlint-${{ github.ref }}" cancel-in-progress: ${{ github.event_name == 'pull_request' }} diff --git a/.github/workflows/autogenerated-files.yml b/.github/workflows/autogenerated-files.yml index 1689fdc7f41b1..ed9ba98e3f760 100644 --- a/.github/workflows/autogenerated-files.yml +++ b/.github/workflows/autogenerated-files.yml @@ -16,6 +16,10 @@ env: HOMEBREW_DEVELOPER: 1 HOMEBREW_NO_AUTO_UPDATE: 1 +defaults: + run: + shell: bash -xeuo pipefail {0} + jobs: autogenerated: runs-on: ubuntu-22.04 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f31d643a9df21..f0a83806bfcd6 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -8,6 +8,10 @@ on: branches: - master +defaults: + run: + shell: bash -xeuo pipefail {0} + jobs: analyze: name: Analyze diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d5595a76bc5c2..73c2754c6e2ba 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -13,6 +13,10 @@ on: permissions: contents: read +defaults: + run: + shell: bash -xeuo pipefail {0} + jobs: ubuntu: if: github.repository_owner == 'Homebrew' @@ -41,7 +45,7 @@ jobs: date="$(date --rfc-3339=seconds --utc)" brew_version="$(git describe --tags --dirty --abbrev=7)" - DELIMITER="END_LABELS_$(LC_ALL=C tr -dc '[:alnum:]'