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

Provide an interface to job level settings #152

Open
nrdxp opened this issue Mar 21, 2023 · 1 comment
Open

Provide an interface to job level settings #152

nrdxp opened this issue Mar 21, 2023 · 1 comment

Comments

@nrdxp
Copy link

nrdxp commented Mar 21, 2023

There are some settings that are impossible to set with this action. In particular we have a private AWS ECR docker registry that we log in to using the recommended OIDC method so that we can generate a short-lived CI specific token.

Part of this process requires setting the permissions: id-token: write setting on the job, or the GH token will not have enough permission to accomplish its task. This leaves us in a situation where we either have to abandon the use of this plugin, or abandon the use of OIDC. As an ops professional, I would lean toward the former, but some of our developers would probably prefer to keep using this plugin, so I would just like to request that you offer some sort of interface to this.

If you want to scope it just to permissions that's fine, but I'd prefer something a bit more generic to set any other settings that a job might want, that are currently unsettable by this generator.

@arcaputo3
Copy link

Although not well-documented, you could do this with

ThisBuild / githubWorkflowPermissions := Some(Permissions.Specify(Map(
  PermissionScope.IdToken -> PermissionValue.Write
)))

We needed to implement

ThisBuild / githubWorkflowPermissions := Some(Permissions.Specify(Map(
  PermissionScope.Packages -> PermissionValue.Write
)))

in order to build GitHub packages properly, as by default our tokens do not support this.

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

2 participants