Getting permissions error from create-plugin-update GitHub Action

The create-plugin-update GitHub Action just ran on our plugin repo and it failed with this error:

refusing to allow a GitHub App to create or update workflow `.github/workflows/is-compatible.yml` without `workflows` permission

What do I need to do to fix that?

Hi @wesharper this is a github related issue not related at all with Grafana plugins. I advice you to search information of this error in particular online refusing to allow a GitHub App to create or update workflow

Thanks for your reply, @academo. This workflow ships with the plugin template. So it’s not my code, and I didn’t configure anything to do with it one way or another. One day it was working, and the next I got this error. So at the very least, if something related to this needs me to set some GitHub permissions / configuration, I’d hope to see some documentation about that somewhere within the Grafana plugin dev docs. Does that seem fair?

For anyone else finding this, it is indeed an issue with changes to the create-plugin-update workflow. Grafana changed how it works recently to limit its scope and work on more of a migration model. I’m still working through what all needs to be updated, but using a personal access token seems to help with this error in particular. I haven’t quite gotten that far yet for my plugin repo, however.

Looks like Grafana Labs addressed the issue here: Create plugin: fix permissions issue in cp-update workflow by jackw · Pull Request #2281 · grafana/plugin-tools · GitHub

Hi @wesharper,
apologies for this - we overlooked that github has additional permissions for making changes to workflow files. We’ve now updated our docs explaining the steps required for this workflow to succeed. You can find them here: Set up GitHub workflows for your development environment | Grafana Plugin Tools

The shared workflow has also been updated to v2.0.1 which now requires a token to be passed in and fixes an additional bug related to missing npm dependencies. The previous option of using permissions to set the default GITHUB_TOKEN unfortunately won’t work anymore as it doesn’t allow setting the workflows permission.

1 Like