Documentation
¶
Index ¶
- Variables
- type Annotation
- type GHA
- func (gha *GHA) DisableGHAOutput(in bool)
- func (gha *GHA) EnableGHAOutput()
- func (gha *GHA) EndGroup()
- func (gha *GHA) Error(a Annotation)
- func (gha *GHA) ExportVariable(name, value string) error
- func (gha *GHA) IsGHA() bool
- func (gha *GHA) Notice(a Annotation)
- func (gha *GHA) SetJobSummary(content string) error
- func (gha *GHA) SetOutput(name, value string) error
- func (gha *GHA) StartGroup(name string)
- func (gha *GHA) Warning(a Annotation)
Constants ¶
This section is empty.
Variables ¶
var ErrorNotInGHA = errors.New("Not in GitHub Actions")
ErrorNotInGHA is the error returned when a function can only execute in GitHub Actions, but the current execution environment is NOT GitHub Actions
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct {
// The annotation's content body
Message string
// (optional) Custom title
Title string
// (optional) Filename
File string
// (optional) Line number, starting at 1
Line int
// (optional) Ending line number, starting at 1
EndLine int
}
Annotation represents a message that can optionally be attributed to a specific file location in GitHub. It is shown in the Actions Workflow Run UI
type GHA ¶
type GHA struct {
// contains filtered or unexported fields
}
GHA helps write output for GitHub Actions-specific cases
func (*GHA) DisableGHAOutput ¶
DisableGHAOutput forcibly disables GitHub Actions-specific output types (e.g., groups)
func (*GHA) EnableGHAOutput ¶
func (gha *GHA) EnableGHAOutput()
EnableGHAOutput forcibly enables GitHub Actions-specific output types (e.g., groups)
func (*GHA) EndGroup ¶
func (gha *GHA) EndGroup()
EndGroup ends a GitHub Actions logging group https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines
func (*GHA) Error ¶
func (gha *GHA) Error(a Annotation)
Error creates an error message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.
func (*GHA) ExportVariable ¶
ExportVariable makes an environment variable available to subsequent steps https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
func (*GHA) Notice ¶
func (gha *GHA) Notice(a Annotation)
Notice creates a notice message and prints the message to the log This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.
func (*GHA) SetJobSummary ¶
SetJobSummary appends markdown displayed on the summary page of a workflow run https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
func (*GHA) SetOutput ¶
SetOutput generates a GitHub Actions output for the current job https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
func (*GHA) StartGroup ¶
StartGroup creates a GitHub Actions logging group https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines
func (*GHA) Warning ¶
func (gha *GHA) Warning(a Annotation)
Warning creates a warning message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.