-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: use GitHub App token for triggering #13
Conversation
|
Yes it does auto run now But
Maybe there should be prefix |
No idea why the new trigger run use the older version of the workflow file (-_-) But token expired/invalid?
|
The permissions are wrong. It also needs workflow scope. If I recall correctly, your GitHub App has that already, so just add |
Updated, started, failed with same message, confirmed workflow file used is updated one |
Hm. Well here's what the action README says:
So it's a matter of translating classic PAT to the fine-grained permissions of the GitHub App. Could try deleting the permissions line entirely, and letting the token have every permission the App is currently able to give. Apparently, this has frustrated others before: dawidd6/action-homebrew-bump-formula#52. If that doesn't work, then the App needs more permissions. Strange as it might seem, I have seen examples where using double quotes around a GitHub context reference causes problems. So, try Ah, now I see Homebrew also provides an action for this: Homebrew/actions/bump-packages@master. It also wants a classic PAT with public_repo and workflow scopes, though. I'm not sure if it works with third-party taps, but the command it uses would be akin to: HOMEBREW_DEVELOPER: "1" HOMEBREW_GITHUB_API_TOKEN: ${{ steps.get_workflow_token.outputs.token }} brew bump --open-pr --tap pikachuexe/freetube --casks pikachuexe-freetube |
https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user At least for Update 1: Found https://github.com/orgs/Homebrew/discussions/5129 |
Great, no answers given though. Something else I noticed is the tap reference is wrong. I think it should be As far as using Homebrew's action. I would guess it could work using the fully qualified name for the cask: |
I mean, the other thing that could be done is "manually" updating the cask definition in the build workflow. We have the DMG and can use CLI to get its |
Don't be sorry. There is no way I can make this far so quickly without your help But I find https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow |
If you can make it work it's also great |
Thanks. We're already doing that in the get-workflow-token step, aren't we? Somewhere I saw maybe it needs By the way, the permissions are here under "Properties of There's an But it seems to only actually use user_name and user_email in https://github.com/eugenesvk/action-homebrew-bump-cask/blob/master/main.rb#L84-L87. |
Trying direct update/PR route GitHub Actions tried: Local commands tried:
Update 1: My local file is downloaded earlier and got different hash |
This note was added to the docs for the softprops/action-gh-release action two weeks ago, apparently after I had already worked on that part three weeks ago:
Please delete the release and re-run the release-manual-trigger workflow after merging this to see if this fixes the problem.