bevyengine / bevy_github_ci_template

Apache License 2.0
202 stars 45 forks source link

Document how to get around "Resource not accessible" error in Github actions #28

Closed paul-hansen closed 1 year ago

paul-hansen commented 1 year ago

Fixes #26

rparrett commented 1 year ago

Should we be specifying the required permissions in the workflow instead?

This seems sort of new / I don't remember having to do this previously.

https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token

edit: pretty sure this won't help

rparrett commented 1 year ago

Is it possible that this was only required because it was being tested in a fork? I suppose either way, adding this message is harmless.

paul-hansen commented 1 year ago

Is it possible that this was only required because it was being tested in a fork?

I think it's likely that it is because it's a fork but I created it using the big green "Use this template" button on GitHub so it's pretty likely that others would run into it too. image

This seems sort of new / I don't remember having to do this previously.

It could also be a recent thing, though this is my first time using it as a template. When I used this for the bevy jam 2, I added it to an existing project and I didn't run into it then.

Should we be specifying the required permissions in the workflow instead?

If that's possible that would be ideal! Didn't know that might be a thing when I wrote this PR.

rparrett commented 1 year ago

It could also be a recent thing, though this is my first time using it as a template.

Good point. Actually, I haven't tested this as a template before, but I can confirm that I see the same thing when using the "Use this template" button.

It seems like this might be an old issue with actions-rs/clippy-check though.

https://github.com/actions-rs/clippy-check/issues/2

Which apparently needs some sort of write perms to annotate commits.

rparrett commented 1 year ago

Pinging @mockersf for github CI expertise. Is it an issue to instruct users to add these permissions?

They don't seem to be the default even for non-forked repos.

This also seems to be a problem with the release workflow, so moving away from actions-rs/clippy-check doesn't seem like a solution.