jit

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package jit mints GitHub Actions runner JIT configs per org installation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Minter

type Minter struct {
	// contains filtered or unexported fields
}

Minter generates a JIT runner config for a tenant scope (an org, or an "owner/repo" for repo-scoped targets). It must be pre-loaded with an authenticated client per scope via Add.

func New

func New() *Minter

New constructs an empty Minter.

func (*Minter) Add

func (m *Minter) Add(ctx context.Context, a gh.AppAuth, runnerGroupID int64) error

Add authenticates as the App installation for a's target (org or repo) and registers the resulting client under a.Scope() with the runner group it should mint into. runnerGroupID == 0 falls back to DefaultRunnerGroupID.

func (*Minter) Client added in v0.2.12

func (m *Minter) Client(scope string) *github.Client

Client returns the App client registered for scope, nil if none.

func (*Minter) Mint

func (m *Minter) Mint(ctx context.Context, name string, job domain.Job, labels []string) (string, error)

Mint requests a JIT runner config for the job's scope under the previously offered name. Repo scopes ("owner/repo") mint a repo-level runner; org scopes mint an org-level one.

Jump to

Keyboard shortcuts

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