GitHub

v5.1.0 published on Tuesday, Nov 15, 2022 by Pulumi

The GitHub provider for Pulumi can be used to provision any of the cloud resources available in GitHub. The GitHub provider must be configured with credentials to deploy and update resources in GitHub.

Example

const github = require("@pulumi/github")

const repo = new github.Repository("demo-repo", {
  description: "Generated from automated test",
  visibility: "private",
});
import * as github from "@pulumi/github";

const repo = new github.Repository("demo-repo", {
  description: "Generated from automated test",
  visibility: "private",
});
import pulumi_github as github

repo = github.Repository("demo-repo",
  description="Generated from automated test",
  visibility="private",
)
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	github "github.com/pulumi/pulumi-github/sdk/v4/go/github"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		repository, err := github.NewRepository(ctx, "demo-repo", &github.RepositoryArgs{
			Description: pulumi.String("Generated from automated test"),
			Visibility:  pulumi.String("private"),
		})
		if err != nil {
			return err
		}

		return nil
	})
}
import com.pulumi.Pulumi;
import com.pulumi.github.Repository;
import com.pulumi.github.RepositoryArgs;

public class App {
    public static void main(String[] args) {
        Pulumi.run(ctx -> {
            var repository = new Repository("demo-repo", RepositoryArgs.builder()
                    .description("Generated from automated test")
                    .visibility("private")
                    .build());
        });
    }
}
using Pulumi;
using Pulumi.Github;

await Deployment.RunAsync(() =>
{
  var repo = new Repository("test", new RepositoryArgs
  {
      Description = "Generated from automated test",
      Visibility = "private",
  });
});