Skip to content

Check brew upgrade of a formula installed by its full name on macOS - #252

Merged
Gorka Gonzalo (d0ubl3g) merged 2 commits into
devfrom
ci/brew-upgrade-check-179
Oct 28, 2026
Merged

Gorka Gonzalo (d0ubl3g) merged 2 commits into
devfrom
ci/brew-upgrade-check-179

Conversation

@d0ubl3g

Copy link
Copy Markdown
Contributor

Adds .github/workflows/brew-upgrade.yml. It checks the last acceptance criterion of #179 on a macOS runner: a formula installed by its full name upgrades with brew upgrade hodeishield on a Homebrew that enforces tap trust.

  • It fails unless Homebrew is version 7 or newer.
  • It taps hodeitek/hodeishield at an older commit that holds 0.5.1. It checks that the short name is refused as untrusted, which shows that tap trust is enforced. It then installs hodeitek/hodeishield/hodeishield by the full name.
  • It moves the tap to its latest commit, runs brew upgrade hodeishield, and asserts that the installed version is the tap's latest and differs from the one before.
  • It never runs brew trust and never sets HOMEBREW_NO_REQUIRE_TAP_TRUST. It uses no secrets and needs only contents: read.

It runs on demand and on a pull request that changes the file, so this PR's own run is the evidence.

Refs #179

Installs an older release from the tap by its full name, moves the tap to its latest commit, runs brew upgrade and asserts the version changed. Also checks that the short name is refused while the tap is untrusted.

Refs #179

Signed-off-by: d0ubl3g <48954024+d0ubl3g@users.noreply.github.com>
actionlint's shellcheck flagged SC2016 on the step summary, whose
backticks sat in single quotes. The upgrade check itself passed on its
first run (https://github.com/Hodeitek/hodeishield-cli/actions/runs/40736058559):
on macos-latest with Homebrew 7.0.10, installing by the short name was
refused ("Refusing to load formula hodeitek/hodeishield/hodeishield from
untrusted tap hodeitek/hodeishield."). Installing by the full name gave
0.5.1, and after the tap moved to its latest commit, `brew upgrade
hodeishield` installed 0.6.0. Nothing trusted the tap and nothing turned
tap trust off.

Closes #179

Signed-off-by: d0ubl3g <48954024+d0ubl3g@users.noreply.github.com>
@d0ubl3g
Gorka Gonzalo (d0ubl3g) merged commit 9c21a8e into dev Oct 28, 2026
23 checks passed
@d0ubl3g
Gorka Gonzalo (d0ubl3g) deleted the ci/brew-upgrade-check-179 branch October 28, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant