mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
bin/brew: don't filter GitHub Actions variables.
This commit is contained in:
parent
03d07beb8c
commit
a1dc809f5b
1
.github/workflows/doctor.yml
vendored
1
.github/workflows/doctor.yml
vendored
@ -10,7 +10,6 @@ on:
|
|||||||
- Library/Homebrew/os/mac/xcode.rb
|
- Library/Homebrew/os/mac/xcode.rb
|
||||||
env:
|
env:
|
||||||
HOMEBREW_DEVELOPER: 1
|
HOMEBREW_DEVELOPER: 1
|
||||||
HOMEBREW_GITHUB_ACTIONS: 1
|
|
||||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
|
6
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
@ -5,7 +5,6 @@ on:
|
|||||||
pull_request: []
|
pull_request: []
|
||||||
env:
|
env:
|
||||||
HOMEBREW_DEVELOPER: 1
|
HOMEBREW_DEVELOPER: 1
|
||||||
HOMEBREW_GITHUB_ACTIONS: 1
|
|
||||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
@ -73,11 +72,6 @@ jobs:
|
|||||||
sudo chmod -R g-w,o-w /home/linuxbrew/.linuxbrew/Homebrew
|
sudo chmod -R g-w,o-w /home/linuxbrew/.linuxbrew/Homebrew
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set variables for coverage reporting
|
|
||||||
export HOMEBREW_CI_BUILD_NUMBER="$GITHUB_REF"
|
|
||||||
export HOMEBREW_CI_BRANCH="$HEAD_GITHUB_REF"
|
|
||||||
export HOMEBREW_GITHUB_REPOSITORY="$GITHUB_REPOSITORY"
|
|
||||||
|
|
||||||
# don't bother running all tests on both platforms (for speed)
|
# don't bother running all tests on both platforms (for speed)
|
||||||
if [ "$RUNNER_OS" = "Linux" ]; then
|
if [ "$RUNNER_OS" = "Linux" ]; then
|
||||||
brew tests --no-compat --online
|
brew tests --no-compat --online
|
||||||
|
@ -907,7 +907,7 @@ module Homebrew
|
|||||||
|
|
||||||
def check_cask_staging_location
|
def check_cask_staging_location
|
||||||
# Skip this check when running CI since the staging path is not writable for security reasons
|
# Skip this check when running CI since the staging path is not writable for security reasons
|
||||||
return if ENV["HOMEBREW_GITHUB_ACTIONS"]
|
return if ENV["GITHUB_ACTIONS"]
|
||||||
|
|
||||||
path = Cask::Caskroom.path
|
path = Cask::Caskroom.path
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ module Homebrew
|
|||||||
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
|
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
|
||||||
# repository. This only needs to support whatever CI providers
|
# repository. This only needs to support whatever CI providers
|
||||||
# Homebrew/brew is currently using.
|
# Homebrew/brew is currently using.
|
||||||
return if ENV["HOMEBREW_GITHUB_ACTIONS"]
|
return if ENV["GITHUB_ACTIONS"]
|
||||||
|
|
||||||
message = <<~EOS
|
message = <<~EOS
|
||||||
Your Xcode (#{MacOS::Xcode.version}) is outdated.
|
Your Xcode (#{MacOS::Xcode.version}) is outdated.
|
||||||
@ -100,7 +100,7 @@ module Homebrew
|
|||||||
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
|
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
|
||||||
# repository. This only needs to support whatever CI providers
|
# repository. This only needs to support whatever CI providers
|
||||||
# Homebrew/brew is currently using.
|
# Homebrew/brew is currently using.
|
||||||
return if ENV["HOMEBREW_GITHUB_ACTIONS"]
|
return if ENV["GITHUB_ACTIONS"]
|
||||||
|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
A newer Command Line Tools release is available.
|
A newer Command Line Tools release is available.
|
||||||
|
4
bin/brew
4
bin/brew
@ -86,8 +86,7 @@ then
|
|||||||
export CI="1"
|
export CI="1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# test-bot does environment filtering itself
|
if [[ -z "$HOMEBREW_NO_ENV_FILTERING" ]]
|
||||||
if [[ -z "$HOMEBREW_NO_ENV_FILTERING" && "$1" != "test-bot" ]]
|
|
||||||
then
|
then
|
||||||
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
|
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
|
||||||
|
|
||||||
@ -95,6 +94,7 @@ then
|
|||||||
# Filter all but the specific variables.
|
# Filter all but the specific variables.
|
||||||
for VAR in HOME SHELL PATH TERM TERMINFO COLUMNS DISPLAY LOGNAME USER CI SSH_AUTH_SOCK SUDO_ASKPASS \
|
for VAR in HOME SHELL PATH TERM TERMINFO COLUMNS DISPLAY LOGNAME USER CI SSH_AUTH_SOCK SUDO_ASKPASS \
|
||||||
http_proxy https_proxy ftp_proxy no_proxy all_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \
|
http_proxy https_proxy ftp_proxy no_proxy all_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \
|
||||||
|
GITHUB_ACTIONS GITHUB_REPOSITORY GITHUB_RUN_ID GITHUB_SHA GITHUB_HEAD_REF GITHUB_BASE_REF GITHUB_REF \
|
||||||
"${!HOMEBREW_@}"
|
"${!HOMEBREW_@}"
|
||||||
do
|
do
|
||||||
# Skip if variable value is empty.
|
# Skip if variable value is empty.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user