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_AUTO_UPDATE: 1
|
||||||
HOMEBREW_NO_ENV_HINTS: 1
|
HOMEBREW_NO_ENV_HINTS: 1
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: "actionlint-${{ github.ref }}"
|
group: "actionlint-${{ github.ref }}"
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
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_DEVELOPER: 1
|
||||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
autogenerated:
|
autogenerated:
|
||||||
runs-on: ubuntu-22.04
|
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:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
|
8
.github/workflows/docker.yml
vendored
8
.github/workflows/docker.yml
vendored
@ -13,6 +13,10 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ubuntu:
|
ubuntu:
|
||||||
if: github.repository_owner == 'Homebrew'
|
if: github.repository_owner == 'Homebrew'
|
||||||
@ -41,7 +45,7 @@ jobs:
|
|||||||
date="$(date --rfc-3339=seconds --utc)"
|
date="$(date --rfc-3339=seconds --utc)"
|
||||||
brew_version="$(git describe --tags --dirty --abbrev=7)"
|
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}"
|
cat <<EOS | tee -a "${GITHUB_OUTPUT}"
|
||||||
labels<<${DELIMITER}
|
labels<<${DELIMITER}
|
||||||
org.opencontainers.image.created=${date}
|
org.opencontainers.image.created=${date}
|
||||||
@ -82,7 +86,7 @@ jobs:
|
|||||||
|
|
||||||
{
|
{
|
||||||
if [[ "${#tags[@]}" -ne 0 ]]; then
|
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}"
|
echo "tags<<${DELIMITER}"
|
||||||
printf "%s\n" "${tags[@]}"
|
printf "%s\n" "${tags[@]}"
|
||||||
echo "${DELIMITER}"
|
echo "${DELIMITER}"
|
||||||
|
6
.github/workflows/docs.yml
vendored
6
.github/workflows/docs.yml
vendored
@ -17,6 +17,10 @@ env:
|
|||||||
HOMEBREW_BOOTSNAP: 1
|
HOMEBREW_BOOTSNAP: 1
|
||||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docs:
|
docs:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
@ -38,8 +42,6 @@ jobs:
|
|||||||
- name: Cleanup Homebrew/brew docs
|
- name: Cleanup Homebrew/brew docs
|
||||||
if: github.repository == 'Homebrew/brew'
|
if: github.repository == 'Homebrew/brew'
|
||||||
run: |
|
run: |
|
||||||
set -xeuo pipefail
|
|
||||||
|
|
||||||
# Avoid failing on broken symlinks.
|
# Avoid failing on broken symlinks.
|
||||||
rm Library/Homebrew/os/mac/pkgconfig/fuse/fuse.pc
|
rm Library/Homebrew/os/mac/pkgconfig/fuse/fuse.pc
|
||||||
rm Library/Homebrew/os/mac/pkgconfig/fuse/osxfuse.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/diagnostic.rb
|
||||||
- Library/Homebrew/extend/os/mac/diagnostic.rb
|
- Library/Homebrew/extend/os/mac/diagnostic.rb
|
||||||
- Library/Homebrew/os/mac/xcode.rb
|
- Library/Homebrew/os/mac/xcode.rb
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
HOMEBREW_DEVELOPER: 1
|
HOMEBREW_DEVELOPER: 1
|
||||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
determine-runners:
|
determine-runners:
|
||||||
runs-on: ubuntu-22.04
|
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 }}
|
PKG_APPLE_DEVELOPER_TEAM_ID: ${{ secrets.PKG_APPLE_DEVELOPER_TEAM_ID }}
|
||||||
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
|
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
|
||||||
HOMEBREW_NO_ANALYTICS_MESSAGE_OUTPUT: 1
|
HOMEBREW_NO_ANALYTICS_MESSAGE_OUTPUT: 1
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.repository_owner == 'Homebrew' && github.actor != 'dependabot[bot]'
|
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_BOOTSNAP: 1
|
||||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rubydoc:
|
rubydoc:
|
||||||
if: github.repository == 'Homebrew/brew'
|
if: github.repository == 'Homebrew/brew'
|
||||||
|
4
.github/workflows/schemas.yml
vendored
4
.github/workflows/schemas.yml
vendored
@ -12,6 +12,10 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
spdx:
|
spdx:
|
||||||
if: github.repository == 'Homebrew/brew'
|
if: github.repository == 'Homebrew/brew'
|
||||||
|
4
.github/workflows/sorbet.yml
vendored
4
.github/workflows/sorbet.yml
vendored
@ -18,6 +18,10 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tapioca:
|
tapioca:
|
||||||
if: github.repository == 'Homebrew/brew'
|
if: github.repository == 'Homebrew/brew'
|
||||||
|
4
.github/workflows/spdx.yml
vendored
4
.github/workflows/spdx.yml
vendored
@ -12,6 +12,10 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
spdx:
|
spdx:
|
||||||
if: github.repository == 'Homebrew/brew'
|
if: github.repository == 'Homebrew/brew'
|
||||||
|
@ -21,6 +21,10 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
updates:
|
updates:
|
||||||
runs-on: ubuntu-22.04
|
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
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: stale-issues
|
group: stale-issues
|
||||||
cancel-in-progress: ${{ github.event_name != 'issue_comment' }}
|
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_NO_INSTALL_CLEANUP: 1
|
||||||
HOMEBREW_VERIFY_ATTESTATIONS: 1
|
HOMEBREW_VERIFY_ATTESTATIONS: 1
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: "${{ github.ref }}"
|
group: "${{ github.ref }}"
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||||
@ -328,7 +332,7 @@ jobs:
|
|||||||
|
|
||||||
# Retry multiple times when using BuildPulse to detect and submit
|
# Retry multiple times when using BuildPulse to detect and submit
|
||||||
# flakiness (because rspec-retry is disabled).
|
# flakiness (because rspec-retry is disabled).
|
||||||
if [[ -n "${HOMEBREW_BUILDPULSE_ACCESS_KEY_ID}" ]]
|
if [[ -n "${HOMEBREW_BUILDPULSE_ACCESS_KEY_ID-}" ]]
|
||||||
then
|
then
|
||||||
brew tests ${{ matrix.test-flags }} ||
|
brew tests ${{ matrix.test-flags }} ||
|
||||||
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
|
contents: read
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
vendor-gems:
|
vendor-gems:
|
||||||
if: github.repository_owner == 'Homebrew'
|
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:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -xeuo pipefail {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-vendor-version:
|
check-vendor-version:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
Loading…
x
Reference in New Issue
Block a user