GitHub

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.

See the full API documentation for complete details of the available GitHub provider APIs.

Setup

The GitHub provider supports several options for providing access to GitHub credentials. See the GitHub setup page for details.

Example

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

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

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

repo = github.Repository("demo-repo",
  description="Generated from automated test",
  private="true",
)
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"),
			Private:     pulumi.Bool(true),
		})
		if err != nil {
			return err
		}

		return nil
	})
}

using System.Collections.Generic;
using System.Threading.Tasks;
using Pulumi;
using Pulumi.Github;

class Program
{
    static Task Main() =>
        Deployment.Run(() => {
            var repo = new Repository("test", new RepositoryArgs
            {
                Description = "Generated from automated test",
                Private = true,
            });
        });
}

Libraries

The following packages are available in packager managers:

The GitHub provider is open source and available in the pulumi/pulumi-github repo.