mercari/hcledit

Brew install not working

Opened this issue · 4 comments

Hello team,

When i go with instructor of install hcledit cmd using brew I face with error
Error: mercari/hcledit/hcledit: wrong number of arguments (given 1, expected 0)

Steps that I execute in my terminal:

OS and System:
Mac OS M2

Thank you for your report.
I could reproduce the issue.

We have released new versions, but formula wasn't updated.
https://github.com/mercari/hcledit/blob/main/Formula/hcledit.rb

Formula should have been updated by GoReleaser.

hcledit/.goreleaser.yml

Lines 38 to 44 in dd2a67f

brews:
- repository:
owner: mercari
name: hcledit
directory: Formula
homepage: https://github.com/mercari/hcledit
description: CLI to edit HCL configurations

The latest release workflow failed.

https://github.com/mercari/hcledit/actions/runs/9574541574/job/26397944699#step:5:89

  ⨯ release failed after 1m8s                error=1 error occurred:
	* homebrew tap formula: could not update "Formula/hcledit.rb": PUT https://api.github.com/repos/mercari/hcledit/contents/Formula/hcledit.rb: 409 Could not update file: Commits must have verified signatures. Changes must be made through a pull request. []

Oh, I see. GoReleaser tried to push a commit to the main branch directly, but it failed due to the branch protection rule.

  • Require a pull request before merging
  • Require signed commits

Unfortunately, GitHub Actions can't be added to the bypass list.

So there are some options.

  1. Separate tap repository and disable some rules on the repository
  2. Use GitHub App or PAT instead of GitHub Actions token to release tap.

It seems we can update the goreleaser config to have it open PRs instead of merging directly to trunk. Let me update the GHA token permissions and update the goreleaser config.