Documentation
¶
Overview ¶
Package githubactions implements buildrunner.BuildRunner backed by GitHub Actions workflow_dispatch.
The runner dispatches a trusted workflow and passes SubmitQueue's base/head change URIs as workflow inputs. Trigger returns the GitHub workflow run ID; Status and Cancel use that ID to call GitHub's workflow-run endpoints.
Index ¶
Constants ¶
View Source
const ( // InputKeyBaseURIs carries the JSON-encoded ordered list of change URIs // from dependency batches. InputKeyBaseURIs = "sq_base_uris" // InputKeyHeadURIs carries the JSON-encoded ordered list of change URIs // from the batch under test. InputKeyHeadURIs = "sq_head_uris" // InputKeyQueue carries the SubmitQueue queue name. InputKeyQueue = "sq_queue" // InputKeyMetadata carries caller-supplied BuildMetadata as JSON. InputKeyMetadata = "sq_metadata" )
Variables ¶
This section is empty.
Functions ¶
func NewBuildRunner ¶
func NewBuildRunner(params Params) buildrunner.BuildRunner
NewBuildRunner constructs a GitHub Actions-backed BuildRunner bound to one repository/workflow and one queue config.
Types ¶
type Params ¶
type Params struct {
// Config holds the per-queue identity for this BuildRunner.
Config buildrunner.Config
// Client is a pre-constructed GitHub Actions client, bound to one
// repository and workflow. The wiring layer builds it once via
// platformgithubactions.NewClient, with the GitHub API root (via
// platform/http.BaseURLTransport) and auth already configured.
Client *platformgithubactions.Client
// Resolver resolves a batch's changes (base and head batches).
Resolver changeset.Resolver
// Logger is the structured logger.
Logger *zap.SugaredLogger
// Ref is the branch, tag, or SHA where the trusted workflow is read from.
// Defaults to "main".
Ref string
// ExtraInputs are copied into every workflow_dispatch request. Reserved
// sq_* inputs managed by this package override conflicting keys.
ExtraInputs map[string]string
}
Params holds the dependencies for a GitHub Actions BuildRunner. The wiring layer is responsible for supplying non-nil Client/Logger; a nil value panics on first use rather than being validated here.
Click to show internal directories.
Click to hide internal directories.