Documentation
¶
Index ¶
- Variables
- func DeleteOrgRunner(pat, org, name string) error
- func DeleteRepoRunner(pat, repoURL, name string) error
- func ExportRunnerOutputs(ctx *pulumi.Context)
- func GenerateInstallationToken(appID, installationID, privateKeyPath string) (string, error)
- func GenerateOrgRegistrationToken(pat, org string) (string, error)
- func GenerateRegistrationToken(pat, repoURL string) (string, error)
- func GetManagementToken() (string, error)
- func GetToken() string
- func Init(args *GithubRunnerArgs)
- func SetupRunner(ctx *pulumi.Context, args *GithubRunnerArgs) error
- func TryDeregister(pat string, outputs map[string]interface{})
- type Arch
- type GithubRunnerArgs
- type Platform
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DeleteOrgRunner ¶ added in v0.14.3
DeleteOrgRunner removes the named runner from the given GitHub organization.
func DeleteRepoRunner ¶ added in v0.14.3
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
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
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
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
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
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 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
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 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