ActionsRepositoryAccessLevel

class ActionsRepositoryAccessLevel : KotlinCustomResource

This resource allows you to set the access level of a non-public repositories actions and reusable workflows for use in other repositories. You must have admin access to a repository to use this resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = new github.Repository("example", {
name: "my-repository",
visibility: "private",
});
const test = new github.ActionsRepositoryAccessLevel("test", {
accessLevel: "user",
repository: example.name,
});
import pulumi
import pulumi_github as github
example = github.Repository("example",
name="my-repository",
visibility="private")
test = github.ActionsRepositoryAccessLevel("test",
access_level="user",
repository=example.name)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = new Github.Repository("example", new()
{
Name = "my-repository",
Visibility = "private",
});
var test = new Github.ActionsRepositoryAccessLevel("test", new()
{
AccessLevel = "user",
Repository = example.Name,
});
});
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
Name: pulumi.String("my-repository"),
Visibility: pulumi.String("private"),
})
if err != nil {
return err
}
_, err = github.NewActionsRepositoryAccessLevel(ctx, "test", &github.ActionsRepositoryAccessLevelArgs{
AccessLevel: pulumi.String("user"),
Repository: example.Name,
})
if err != nil {
return err
}
return nil
})
}
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.RepositoryArgs;
import com.pulumi.github.ActionsRepositoryAccessLevel;
import com.pulumi.github.ActionsRepositoryAccessLevelArgs;
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", RepositoryArgs.builder()
.name("my-repository")
.visibility("private")
.build());
var test = new ActionsRepositoryAccessLevel("test", ActionsRepositoryAccessLevelArgs.builder()
.accessLevel("user")
.repository(example.name())
.build());
}
}
resources:
example:
type: github:Repository
properties:
name: my-repository
visibility: private
test:
type: github:ActionsRepositoryAccessLevel
properties:
accessLevel: user
repository: ${example.name}

Import

This resource can be imported using the name of the GitHub repository:

$ pulumi import github:index/actionsRepositoryAccessLevel:ActionsRepositoryAccessLevel test my-repository

Properties

Link copied to clipboard
val accessLevel: Output<String>

Where the actions or reusable workflows of the repository may be used. Possible values are none, user, organization, or enterprise.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val repository: Output<String>

The GitHub repository

Link copied to clipboard
val urn: Output<String>