Skip to content

Commit f9ec8d7

Browse files
committed
ci(homebrew): run tap PR workflow on macos
1 parent f96cca5 commit f9ec8d7

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

.github/workflows/homebrew-tap-pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ concurrency:
1818
jobs:
1919
update-tap:
2020
name: Update homebrew tap formula
21-
runs-on: ubuntu-latest
21+
# Formula verification calls `brew style/audit/install/test`, so run on macOS
22+
# where Homebrew is available by default on GitHub-hosted runners.
23+
runs-on: macos-latest
2224
permissions:
2325
contents: read
2426
env:
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# 0014: Run Homebrew tap PR workflow on macOS
2+
Date: 2026-02-16
3+
Status: Accepted
4+
5+
## Context
6+
7+
The Homebrew tap workflow (`.github/workflows/homebrew-tap-pr.yml`) runs the
8+
`homebrew-verify-formula` step before opening or updating a tap PR.
9+
10+
That verification path executes `brew style`, `brew audit`, `brew install`, and
11+
`brew test` via `scripts/homebrew/tap_release.py`.
12+
13+
The job previously ran on `ubuntu-latest`, where `brew` is not available by
14+
default. This caused the workflow to fail before PR creation with:
15+
16+
- `ERROR: \`brew\` is required for formula verification`
17+
18+
As a result, release-to-tap automation could not complete even when tags and
19+
token permissions were valid.
20+
21+
## Decision
22+
23+
Run the `update-tap` job in `.github/workflows/homebrew-tap-pr.yml` on
24+
`macos-latest` instead of `ubuntu-latest`.
25+
26+
## Consequences
27+
28+
- Formula verification now executes in an environment where Homebrew is
29+
available by default, allowing the workflow to proceed through verification
30+
and PR creation.
31+
- The workflow keeps full verification coverage (`style`, `audit`, `install`,
32+
`test`) instead of weakening checks.
33+
- Runtime/cost may increase relative to Ubuntu-hosted execution.
34+
35+
## Alternatives considered
36+
37+
1. Install Linuxbrew in the Ubuntu job.
38+
- Rejected: adds setup complexity and more moving parts in a release
39+
automation path.
40+
2. Skip formula verification when `brew` is missing.
41+
- Rejected: reduces safety by allowing unverified formula changes.
42+
43+
## References/links
44+
45+
- `/Users/stevemorin/c/envgen/.github/workflows/homebrew-tap-pr.yml`
46+
- `https://github.com/smorinlabs/envgen/actions/runs/22078918496`

0 commit comments

Comments
 (0)