Skip to content

ci: fix Homebrew workflows (setup-homebrew@main, post_install_steps, tap trust) - #2112

Merged
sbryngelson merged 3 commits into
MFlowCode:masterfrom
sbryngelson:ci/homebrew-actions-main
Oct 26, 2026
Merged

sbryngelson merged 3 commits into
MFlowCode:masterfrom
sbryngelson:ci/homebrew-actions-main

Conversation

@sbryngelson

@sbryngelson sbryngelson commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Homebrew renamed the default branch of Homebrew/actions from master to main. Workflows that pin @master no longer resolve, so Homebrew Formula Test fails at job setup before any step runs (run 40377630642, on the v5.7.1 tag push):

##[error]Unable to resolve action `homebrew/actions@master`, unable to find version `master`

Change

Homebrew/actions/setup-homebrew@master becomes @main in the two workflows that use it:

  • .github/workflows/homebrew.yml (Homebrew Formula Test)
  • .github/workflows/deploy-tap.yml (not yet triggered since the rename, but would fail the same way)

main keeps the current behaviour of tracking Homebrew's latest action. setup-homebrew/action.yml exists on main.

homebrew-release.yml does not use this action, which is why the v5.7.1 tap update succeeded.

Second break uncovered: FormulaAudit/InstallSteps

With the action resolving again, brew style failed on a new cop:

FormulaAudit/InstallSteps: Formulae must use `post_install_steps` instead of `post_install`.

Homebrew now rejects post_install methods in every tap (Formula Cookbook); post-install work must be declared with the post_install_steps DSL. The formula's only post-install action was a chmod 0755 on the libexec/mfc wrapper, which maps directly onto the supported set_permissions step:

post_install_steps do
  set_permissions "mfc", "0755", base: :libexec
end

Third break: untrusted taps

brew now refuses to load a formula from an untrusted tap:

##[error]Refusing to load formula mflowcode/test/mfc from untrusted tap mflowcode/test.

In homebrew.yml the audit ends in || true, so this failed silently and the audit has not been running. In deploy-tap.yml the audit has no fallback, so the push to master that merging this PR triggers (it changes mfc.rb) would have failed. Each temporary tap is now trusted right after brew tap-new: mflowcode/test twice in homebrew.yml, mfc/local in deploy-tap.yml. With this, the audit in homebrew.yml runs and reports no problems. The --strict --new audit in deploy-tap.yml runs only on master and is not exercised by this PR.

Homebrew renamed the default branch of Homebrew/actions from master to
main, so @master no longer resolves and Homebrew Formula Test fails at
job setup.
@sbryngelson
sbryngelson requested a review from a team as a code owner October 26, 2026 18:29
@sbryngelson
sbryngelson requested review from danieljvickers and removed request for a team October 26, 2026 18:29
The new FormulaAudit/InstallSteps cop rejects post_install methods.
@github-actions

Copy link
Copy Markdown

Claude Code Review

Head SHA: 9688739

Files changed:

  • 2
  • .github/workflows/deploy-tap.yml
  • .github/workflows/homebrew.yml

Findings:

No issues found. Checked the changed hunks in .github/workflows/deploy-tap.yml and .github/workflows/homebrew.yml. Both only change the Homebrew/actions/setup-homebrew ref from master to main. There were no context files for these workflow files, so I checked only the diff. I did not check that the main ref exists upstream.

@sbryngelson sbryngelson changed the title ci: pin Homebrew/actions/setup-homebrew to main ci: fix Homebrew Formula Test (setup-homebrew@main, post_install_steps) Oct 26, 2026
brew now refuses to load formulae from untrusted taps. The audit in
homebrew.yml was failing behind || true, and the audit in deploy-tap.yml
has no fallback, so the next formula push to master would fail.
@sbryngelson sbryngelson changed the title ci: fix Homebrew Formula Test (setup-homebrew@main, post_install_steps) ci: fix Homebrew workflows (setup-homebrew@main, post_install_steps, tap trust) Oct 26, 2026
@sbryngelson
sbryngelson merged commit e95a827 into MFlowCode:master Oct 26, 2026
29 checks passed
@sbryngelson
sbryngelson deleted the ci/homebrew-actions-main branch October 26, 2026 19:36

This branch was successfully deployed

1 active deployment
homebrew — cffbdae5 Deployed Oct 26, 2026 by sbryngelson via Audit and deploy formula #116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant