Documentation
¶
Overview ¶
Package ghactions maps a Levelrail deploy outcome onto GitHub deployment statuses and check runs, for the GitHub Actions deploy action.
Index ¶
Constants ¶
View Source
const ( OutcomeSucceeded = "succeeded" OutcomeFailed = "failed" OutcomeTimeout = "timeout" OutcomeAccepted = "accepted" )
Deploy outcomes the CLI hands to Finish.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHub ¶
type GitHub interface {
CreateDeployment(ctx context.Context, instanceURL, token, owner, repo, ref, environment, description string, production bool) (int64, error)
CreateDeploymentStatus(ctx context.Context, instanceURL, token, owner, repo string, id int64, state githubapp.DeploymentState, environmentURL, logURL, description string) error
CreateCheckRun(ctx context.Context, instanceURL, token, owner, repo string, spec githubapp.CheckRunSpec) (int64, error)
UpdateCheckRun(ctx context.Context, instanceURL, token, owner, repo string, id int64, spec githubapp.CheckRunSpec) error
}
GitHub is the slice of the GitHub client the reporter needs.
type Outcome ¶
type Outcome struct {
DeploymentState githubapp.DeploymentState
PostDeployment bool
CheckConclusion string
Summary string
}
Outcome is how an outcome string maps onto GitHub's vocabularies.
func MapOutcome ¶
MapOutcome translates a deploy outcome into deployment and check states.
type Reporter ¶
Reporter posts deploy progress to one repository.
Click to show internal directories.
Click to hide internal directories.