Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindRun ¶
FindRun finds the most recent GitHub Actions run matching a given run name.
FindRun requires that the `run-name:` tag in a workflow match the `runName` input. For more information about how `run-name:` works in GitHub Actions, refer to: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#run-name
Polling is defined by the `Options.SecondsBetweenPolls` parameter. If no run is returned after `Options.MaxAttempts` attempts, an error is returned
func WaitRunFinished ¶
WaitRunFinished watches a GitHub Actions Workflow Run and returns once the workflow has finished processing
func Worker ¶
Worker spawns an instance of a goroutine that listens for new job requests and then processes those requests until complete. Multiple workers can be instantiated to create a pool for concurrent processing.
Workers create a GitHub Actions workflow run and follow the status of the job until it completes or errors out. The `results` channel is populated with the outcome of any jobs.
Types ¶
type Options ¶
type Options struct {
SecondsBetweenPolls int
MaxAttempts int
Logger hclog.Logger
BranchRef string
BatchID string
WorkflowFileName string
GitHubOwner string
GitHubRepo string
}
Options provides a way to define how frequently the GitHub APIs should be polled for results, as well as the maximum number of attempts before stopping