github

package
v0.14.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Windows Platform = "win"
	Linux   Platform = "linux"
	Darwin  Platform = "osx"

	Arm64   Arch = "arm64"
	Amd64   Arch = "x64"
	Arm     Arch = "arm"
	Ppc64le Arch = "ppc64le"
	S390x   Arch = "s390x"
)

Functions

func DeleteOrgRunner added in v0.14.3

func DeleteOrgRunner(pat, org, name string) error

DeleteOrgRunner removes the named runner from the given GitHub organization.

func DeleteRepoRunner added in v0.14.3

func DeleteRepoRunner(pat, repoURL, name string) error

DeleteRepoRunner removes the named runner from the given repository. repoURL is "owner/repo" or "https://github.com/owner/repo".

func ExportRunnerOutputs added in v0.14.3

func ExportRunnerOutputs(ctx *pulumi.Context)

ExportRunnerOutputs writes the runner name and target (org or repo URL) as Pulumi stack outputs. Call this from deploy() after SetupRunner so the destroy path can read them back without re-parsing CLI flags.

func GenerateInstallationToken added in v0.14.3

func GenerateInstallationToken(appID, installationID, privateKeyPath string) (string, error)

GenerateInstallationToken exchanges GitHub App credentials for a short-lived installation access token suitable for runner management API calls.

func GenerateOrgRegistrationToken added in v0.14.3

func GenerateOrgRegistrationToken(pat, org string) (string, error)

GenerateOrgRegistrationToken calls the GitHub API to create a short-lived runner registration token for the given organization. pat is a Personal Access Token with admin:org scope.

func GenerateRegistrationToken added in v0.14.3

func GenerateRegistrationToken(pat, repoURL string) (string, error)

GenerateRegistrationToken calls the GitHub API to create a short-lived runner registration token for the given repository. pat is a Personal Access Token with repo admin scope. repoURL is in the form "owner/repo" or "https://github.com/owner/repo".

func GetManagementToken added in v0.14.3

func GetManagementToken() (string, error)

GetManagementToken returns a GitHub token suitable for runner management. For GitHub App auth it generates a fresh installation access token. For PAT auth it reads GITHUB_TOKEN from the environment.

func GetToken

func GetToken() string

func Init added in v0.8.2

func Init(args *GithubRunnerArgs)

func SetupRunner added in v0.14.3

func SetupRunner(ctx *pulumi.Context, args *GithubRunnerArgs) error

SetupRunner fetches a runner registration token from the GitHub App and sets it on args. It is a no-op when args is nil, Token is already set, or AppID is empty (PAT / plain-token paths are handled in params).

func TryDeregister added in v0.14.3

func TryDeregister(pat string, outputs map[string]interface{})

TryDeregister removes the runner from GitHub using pat and the stack outputs previously written by ExportRunnerOutputs. It is best-effort: errors are logged as warnings so the caller's destroy always proceeds. outputs is the raw value map from auto.OutputMap (key → output.Value).

Types

type Arch added in v0.8.2

type Arch string

type GithubRunnerArgs

type GithubRunnerArgs struct {
	Token          string
	RepoURL        string
	Org            string
	Name           string
	Platform       *Platform
	Arch           *Arch
	Labels         []string
	User           string
	AppID          string
	InstallationID string
	PrivateKeyPath string
	Ephemeral      bool
}

func GetRunnerArgs added in v0.8.2

func GetRunnerArgs() *GithubRunnerArgs

func (*GithubRunnerArgs) GetSetupScriptTemplate added in v0.8.2

func (args *GithubRunnerArgs) GetSetupScriptTemplate() string

func (*GithubRunnerArgs) GetUserDataValues added in v0.8.2

func (args *GithubRunnerArgs) GetUserDataValues() *integrations.UserDataValues

type Platform added in v0.8.2

type Platform string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL