`brew tap-new` generates tests.yml with invalid `options` job key (fails GitHub Actions validation)
### `brew doctor` output
```shell
Your system is ready to brew.
```
### Verification
- [x] I ran `brew update` twice and am still able to reproduce my issue.
- [x] My "`brew doctor` output" above says `Your system is ready to brew` or a definitely unrelated `Tier` message.
- [x] This issue's title and/or description do not reference a single formula e.g. `brew install wget`. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
### `brew config` output
```shell
HOMEBREW_VERSION: 6.0.11-104-gfd84005
ORIGIN: https://github.com/Homebrew/brew
HEAD: fd8400508b8e5975f40fa4ccbb284ce8c09049c3
Last commit: 4 hours ago
Branch: main
Core tap: N/A
Core cask tap: N/A
HOMEBREW_PREFIX: /opt/homebrew
Homebrew Ruby: 4.0.6 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/4.0.6/bin/ruby
CPU: 15-core 64-bit arm_sotra
Clang: 21.0.0 build 2100
Git: 2.55.0 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 26.5.2-arm64
CLT: 26.6.0.0.1781586589
Xcode: N/A
Rosetta 2: false
```
### What were you trying to do (and why)?
I ran `brew tap-new` to scaffold a new tap and pushed it to GitHub. I expected the generated `.github/workflows/tests.yml` file to be a valid, working CI workflow out of the box, since that's the whole point of the scaffolding command.
### What happened (include all command output)?
After pushing the newly created tap, the tests.yml workflow failed to run at all, with GitHub Actions rejecting it as invalid before any job could start:
Invalid workflow file: .github/workflows/tests.yml#L1
(Line: 19, Col: 5): Unexpected value 'options'
The relevant section of the generated file is:
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
options: ${{ matrix.container != '' && '--privileged' }}
`options` is only valid as a nested key inside `container:` (alongside `image`, `env`, `volumes`, etc.) when `container` is a mapping. It is not a valid standalone job-level key. Here `container` is set to a plain scalar via `${{ matrix.container }}`, so the job-level `options:` key is invalid per the GitHub Actions schema, and the workflow is rejected outright.
### What did you expect to happen?
The generated tests.yml should pass GitHub Actions' workflow validation and run successfully immediately after `brew tap-new`, without requiring manual edits to fix schema errors.
### Step-by-step reproduction instructions (running `brew` commands)
```shell
1. brew tap-new $YOUR_GITHUB_USERNAME/homebrew-tap
2. gh repo create $YOUR_GITHUB_USERNAME/homebrew-tap --push --public --source "$(brew --repository $YOUR_GITHUB_USERNAME/homebrew-tap)"
3. Open the repository on GitHub and view the Actions tab / Settings > Actions, or open a pull request to trigger the workflow
4. Observe: "Invalid workflow file ... Unexpected value 'options'" and the workflow never runs
```
0 条评论