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

Support Github Action Permissions #489

Closed
mindfulmonk opened this issue Jun 11, 2020 · 8 comments
Closed

Support Github Action Permissions #489

mindfulmonk opened this issue Jun 11, 2020 · 8 comments
Labels
r/repository Type: Feature New feature or request

Comments

@mindfulmonk
Copy link

mindfulmonk commented Jun 11, 2020

Hi,

I currently have a use-case where I would like to roll-out Github Actions in the organization, but only to specific repos, currently this is not supported in the provider.

In particular this:

image

There are two tickets about github actions #162 and #381 but wasn't sure if they tackling this specific issue.

This probably should be a new param in https://www.terraform.io/docs/providers/github/r/repository.html called actions with 3 params third-party local disabled

Cheers!

@brntbeer
Copy link

👋 hi @mindfulmonk it seems you request is geared a little towards this repo but maybe more specifically towards feedback on how GitHub actions works itself. It's a bit unclear to me.

Are you wanting to script being able to enable actions on individual repositories? or script adding particular actions to every repository?

@mindfulmonk
Copy link
Author

Hey @brntbeer both, but the more important one is to enable Actions selectively on each repo.

@brntbeer
Copy link

ah ok thanks for that @mindfulmonk. So the reason why Terraform cannot do what you're asking for, is there's no API for actions permissions.

I've filed this as feedback for our roadmap team at GitHub

@jcudit
Copy link
Contributor

jcudit commented Nov 30, 2020

https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#set-allowed-actions-for-a-repository looks promising. However our underlying client library does not show support for this endpoint at the moment.

@jcudit jcudit added Type: Feature New feature or request r/repository labels Nov 30, 2020
@brntbeer
Copy link

@mindfulmonk given https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#set-github-actions-permissions-for-an-organization, does this meet you requirements and just need to wait for the client library to implement?

@shields-fn
Copy link

It looks like the go-github client library now supports this: https://pkg.go.dev/github.com/google/go-github/v35/github#ActionsPermissions

@j-nix
Copy link
Contributor

j-nix commented Oct 1, 2021

I've opened a PR to support this kind of permissions setting on an organizational level #920.

It may or may not cater to your requirements for setting permissions-per repo, but it's a start.

@shinenelson
Copy link

This feature is merged and released. Can't this issue be closed now @jcudit ? Ideally, it should have been linked to #920 and closed when the pull request was merged. But it can be done separately now - unless there is something else that I am missing that warrants keeping this issue open.

@jcudit jcudit closed this as completed Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r/repository Type: Feature New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants