Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brew install not working #113

Open
AshkanYarmoradi opened this issue Apr 25, 2024 · 4 comments
Open

Brew install not working #113

AshkanYarmoradi opened this issue Apr 25, 2024 · 4 comments

Comments

@AshkanYarmoradi
Copy link

AshkanYarmoradi commented Apr 25, 2024

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

@suzuki-shunsuke
Copy link
Contributor

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. []

@suzuki-shunsuke
Copy link
Contributor

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

@suzuki-shunsuke
Copy link
Contributor

suzuki-shunsuke commented Jun 20, 2024

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.

@ryan-ph
Copy link
Member

ryan-ph commented Jul 16, 2024

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.

ryan-ph added a commit that referenced this issue Jul 17, 2024
Currently `goreleaser` is attempting to push directly to trunk which is
blocked by our different rulesets. Instead, we can have `goreleaser`
open a PR and that can be merged manually so that we have no exceptions
for all changes being made through a PR.

#113
ryan-ph added a commit that referenced this issue Jul 23, 2024
* [workflows/release] have `goreleaser` open PRs to update tap

Currently `goreleaser` is attempting to push directly to trunk which is
blocked by our different rulesets. Instead, we can have `goreleaser`
open a PR and that can be merged manually so that we have no exceptions
for all changes being made through a PR.

#113

* [workflows/release] added `contents` write permissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants