Actions Organization Permissions
This resource allows you to create and manage GitHub Actions permissions within your GitHub enterprise organizations. You must have admin access to an organization to use this resource.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Repository;
import com.pulumi.github.ActionsOrganizationPermissions;
import com.pulumi.github.ActionsOrganizationPermissionsArgs;
import com.pulumi.github.inputs.ActionsOrganizationPermissionsAllowedActionsConfigArgs;
import com.pulumi.github.inputs.ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Repository("example");
var test = new ActionsOrganizationPermissions("test", ActionsOrganizationPermissionsArgs.builder()
.allowedActions("selected")
.enabledRepositories("selected")
.allowedActionsConfig(ActionsOrganizationPermissionsAllowedActionsConfigArgs.builder()
.githubOwnedAllowed(true)
.patternsAlloweds(
"actions/cache@*",
"actions/checkout@*")
.verifiedAllowed(true)
.build())
.enabledRepositoriesConfig(ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs.builder()
.repositoryIds(example.repoId())
.build())
.build());
}
}
Import
This resource can be imported using the name of the GitHub organization:
$ pulumi import github:index/actionsOrganizationPermissions:ActionsOrganizationPermissions test github_organization_name
Properties
The permissions policy that controls the actions that are allowed to run. Can be one of: all
, local_only
, or selected
.
Sets the actions that are allowed in an organization. Only available when allowed_actions
= selected
. See Allowed Actions Config below for details.
The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all
, none
, or selected
.
Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories
= selected
. See Enabled Repositories Config below for details.