workflows: use set -xeuo pipefail
globally
This makes it easier to avoid subtle shell script bugs.
This commit is contained in:
parent
45ae9f44d4
commit
40567115a3
4
.github/workflows/actionlint.yml
vendored
4
.github/workflows/actionlint.yml
vendored
@ -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' }}
|
||||
|
4
.github/workflows/autogenerated-files.yml
vendored
4
.github/workflows/autogenerated-files.yml
vendored
@ -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
|
||||
|
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
@ -8,6 +8,10 @@ on:
|
||||
branches:
|
||||
- master
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
|
8
.github/workflows/docker.yml
vendored
8
.github/workflows/docker.yml
vendored
@ -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:]' </dev/urandom | head -c20)"
|
||||
DELIMITER="END_LABELS_$(uuidgen)"
|
||||
cat <<EOS | tee -a "${GITHUB_OUTPUT}"
|
||||
labels<<${DELIMITER}
|
||||
org.opencontainers.image.created=${date}
|
||||
@ -82,7 +86,7 @@ jobs:
|
||||
|
||||
{
|
||||
if [[ "${#tags[@]}" -ne 0 ]]; then
|
||||
DELIMITER="END_TAGS_$(LC_ALL=C tr -dc '[:alnum:]' </dev/urandom | head -c20)"
|
||||
DELIMITER="END_TAGS_$(uuidgen)"
|
||||
echo "tags<<${DELIMITER}"
|
||||
printf "%s\n" "${tags[@]}"
|
||||
echo "${DELIMITER}"
|
||||
|
6
.github/workflows/docs.yml
vendored
6
.github/workflows/docs.yml
vendored
@ -17,6 +17,10 @@ env:
|
||||
HOMEBREW_BOOTSNAP: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-22.04
|
||||
@ -38,8 +42,6 @@ jobs:
|
||||
- name: Cleanup Homebrew/brew docs
|
||||
if: github.repository == 'Homebrew/brew'
|
||||
run: |
|
||||
set -xeuo pipefail
|
||||
|
||||
# Avoid failing on broken symlinks.
|
||||
rm Library/Homebrew/os/mac/pkgconfig/fuse/fuse.pc
|
||||
rm Library/Homebrew/os/mac/pkgconfig/fuse/osxfuse.pc
|
||||
|
7
.github/workflows/doctor.yml
vendored
7
.github/workflows/doctor.yml
vendored
@ -8,11 +8,18 @@ on:
|
||||
- Library/Homebrew/extend/os/diagnostic.rb
|
||||
- Library/Homebrew/extend/os/mac/diagnostic.rb
|
||||
- Library/Homebrew/os/mac/xcode.rb
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
HOMEBREW_DEVELOPER: 1
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
jobs:
|
||||
determine-runners:
|
||||
runs-on: ubuntu-22.04
|
||||
|
5
.github/workflows/pkg-installer.yml
vendored
5
.github/workflows/pkg-installer.yml
vendored
@ -15,6 +15,11 @@ env:
|
||||
PKG_APPLE_DEVELOPER_TEAM_ID: ${{ secrets.PKG_APPLE_DEVELOPER_TEAM_ID }}
|
||||
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
|
||||
HOMEBREW_NO_ANALYTICS_MESSAGE_OUTPUT: 1
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository_owner == 'Homebrew' && github.actor != 'dependabot[bot]'
|
||||
|
4
.github/workflows/rubydoc.yml
vendored
4
.github/workflows/rubydoc.yml
vendored
@ -16,6 +16,10 @@ env:
|
||||
HOMEBREW_BOOTSNAP: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
jobs:
|
||||
rubydoc:
|
||||
if: github.repository == 'Homebrew/brew'
|
||||
|
4
.github/workflows/schemas.yml
vendored
4
.github/workflows/schemas.yml
vendored
@ -12,6 +12,10 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
jobs:
|
||||
spdx:
|
||||
if: github.repository == 'Homebrew/brew'
|
||||
|
4
.github/workflows/sorbet.yml
vendored
4
.github/workflows/sorbet.yml
vendored
@ -18,6 +18,10 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
jobs:
|
||||
tapioca:
|
||||
if: github.repository == 'Homebrew/brew'
|
||||
|
4
.github/workflows/spdx.yml
vendored
4
.github/workflows/spdx.yml
vendored
@ -12,6 +12,10 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
jobs:
|
||||
spdx:
|
||||
if: github.repository == 'Homebrew/brew'
|
||||
|
@ -21,6 +21,10 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
jobs:
|
||||
updates:
|
||||
runs-on: ubuntu-22.04
|
||||
|
4
.github/workflows/stale-issues.yml
vendored
4
.github/workflows/stale-issues.yml
vendored
@ -17,6 +17,10 @@ permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
concurrency:
|
||||
group: stale-issues
|
||||
cancel-in-progress: ${{ github.event_name != 'issue_comment' }}
|
||||
|
6
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
@ -18,6 +18,10 @@ env:
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
HOMEBREW_VERIFY_ATTESTATIONS: 1
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.ref }}"
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
@ -328,7 +332,7 @@ jobs:
|
||||
|
||||
# Retry multiple times when using BuildPulse to detect and submit
|
||||
# flakiness (because rspec-retry is disabled).
|
||||
if [[ -n "${HOMEBREW_BUILDPULSE_ACCESS_KEY_ID}" ]]
|
||||
if [[ -n "${HOMEBREW_BUILDPULSE_ACCESS_KEY_ID-}" ]]
|
||||
then
|
||||
brew tests ${{ matrix.test-flags }} ||
|
||||
brew tests ${{ matrix.test-flags }}
|
||||
|
4
.github/workflows/vendor-gems.yml
vendored
4
.github/workflows/vendor-gems.yml
vendored
@ -20,6 +20,10 @@ permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
jobs:
|
||||
vendor-gems:
|
||||
if: github.repository_owner == 'Homebrew'
|
||||
|
4
.github/workflows/vendor-version.yml
vendored
4
.github/workflows/vendor-version.yml
vendored
@ -9,6 +9,10 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -xeuo pipefail {0}
|
||||
|
||||
jobs:
|
||||
check-vendor-version:
|
||||
runs-on: ubuntu-22.04
|
||||
|
Loading…
x
Reference in New Issue
Block a user