Repository navigation
Check brew upgrade of a formula installed by its full name on macOS - #252
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withbrew upgrade hodeishieldon a Homebrew that enforces tap trust.hodeitek/hodeishieldat 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 installshodeitek/hodeishield/hodeishieldby the full name.brew upgrade hodeishield, and asserts that the installed version is the tap's latest and differs from the one before.brew trustand never setsHOMEBREW_NO_REQUIRE_TAP_TRUST. It uses no secrets and needs onlycontents: 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