Skip to content

Commit dd1b29e

Browse files
committed
fix(homebrew-build-bottles): override HOMEBREW_REQUIRE_TAP_TRUST at step env level
In-script `unset` (v1.8.57) didn't take effect: GitHub-hosted runners seed HOMEBREW_REQUIRE_TAP_TRUST=1 in `/etc/environment`, which child processes (brew → Ruby) re-inherit despite the bash unset in the parent shell. The trust check inside `brew install --build-bottle` therefore kept firing on alef v0.24.10 / kreuzcrawl rc.55 publish reruns. Setting the variable to an empty string in the action.yml step `env:` block hardens the override: GHA exports the empty value to the shell and to every process it spawns, including brew's Ruby interpreter, where `Homebrew::EnvConfig::EnvConfigBool#truthy?` treats "" as falsy and the tap-trust check is skipped. Also lift HOMEBREW_NO_INSTALL_FROM_API and HOMEBREW_NO_SANDBOX_LINUX to the step env: for symmetry — the in-script exports remain as defense-in-depth.
1 parent bce3d5d commit dd1b29e

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

homebrew-build-bottles/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,17 @@ runs:
4747
FORMULAS: ${{ inputs.formulas }}
4848
OUT_DIR: ${{ inputs.out-dir }}
4949
GITHUB_REPO: ${{ inputs.github-repo }}
50+
# GitHub-hosted runner images export HOMEBREW_REQUIRE_TAP_TRUST=1
51+
# in /etc/environment, so child processes (brew → Ruby) inherit it
52+
# even after an in-script `unset`. Setting it to empty at the step
53+
# env: level overrides the inherited value for every process spawned
54+
# by this shell, including brew's Ruby interpreter. EnvConfigBool's
55+
# `truthy?` check treats "" as falsy, so the tap-trust check passes.
56+
HOMEBREW_REQUIRE_TAP_TRUST: ""
57+
# Also force git-tap installs so the formula is read from the
58+
# just-tapped clone instead of the JSON API.
59+
HOMEBREW_NO_INSTALL_FROM_API: "1"
60+
# Disable Homebrew's Linux sandbox (bubblewrap cannot create a
61+
# rootless sandbox on GitHub-hosted Linux runners).
62+
HOMEBREW_NO_SANDBOX_LINUX: "1"
5063
run: "${{ github.action_path }}/scripts/build-bottles.sh"

0 commit comments

Comments
 (0)