diff --git a/.github/workflows/doctor.yml b/.github/workflows/doctor.yml index 1b3c590a30..d99a1d5260 100644 --- a/.github/workflows/doctor.yml +++ b/.github/workflows/doctor.yml @@ -10,7 +10,6 @@ on: - Library/Homebrew/os/mac/xcode.rb env: HOMEBREW_DEVELOPER: 1 - HOMEBREW_GITHUB_ACTIONS: 1 HOMEBREW_NO_AUTO_UPDATE: 1 jobs: tests: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 546b1c158b..28dc39d90a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,6 @@ on: pull_request: [] env: HOMEBREW_DEVELOPER: 1 - HOMEBREW_GITHUB_ACTIONS: 1 HOMEBREW_NO_AUTO_UPDATE: 1 jobs: tests: @@ -73,11 +72,6 @@ jobs: sudo chmod -R g-w,o-w /home/linuxbrew/.linuxbrew/Homebrew 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) if [ "$RUNNER_OS" = "Linux" ]; then brew tests --no-compat --online diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index a2fb1b28c5..63780d4fab 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -907,7 +907,7 @@ module Homebrew def check_cask_staging_location # 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 diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 5b017b19ce..d9b9cadf32 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -73,7 +73,7 @@ module Homebrew # `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew # repository. This only needs to support whatever CI providers # Homebrew/brew is currently using. - return if ENV["HOMEBREW_GITHUB_ACTIONS"] + return if ENV["GITHUB_ACTIONS"] message = <<~EOS 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 # repository. This only needs to support whatever CI providers # Homebrew/brew is currently using. - return if ENV["HOMEBREW_GITHUB_ACTIONS"] + return if ENV["GITHUB_ACTIONS"] <<~EOS A newer Command Line Tools release is available. diff --git a/bin/brew b/bin/brew index 7d4c6d28ec..13eafcbeab 100755 --- a/bin/brew +++ b/bin/brew @@ -86,8 +86,7 @@ then export CI="1" fi -# test-bot does environment filtering itself -if [[ -z "$HOMEBREW_NO_ENV_FILTERING" && "$1" != "test-bot" ]] +if [[ -z "$HOMEBREW_NO_ENV_FILTERING" ]] then PATH="/usr/bin:/bin:/usr/sbin:/sbin" @@ -95,6 +94,7 @@ then # Filter all but the specific variables. 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 \ + GITHUB_ACTIONS GITHUB_REPOSITORY GITHUB_RUN_ID GITHUB_SHA GITHUB_HEAD_REF GITHUB_BASE_REF GITHUB_REF \ "${!HOMEBREW_@}" do # Skip if variable value is empty.