Documentation
¶
Overview ¶
Package gha provides functions to interact with the GitHub Actions runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InGitHubActions ¶
func InGitHubActions() bool
InGitHubActions indicates whether this application is being run within the GitHub Actions environment.
func PopulateFromInputs ¶
func PopulateFromInputs(v interface{}) (err error)
PopulateFromInputs will populate the given struct with inputs supplied by the GitHub Actions environment. Fields that should be populated must be tagged with `gha:"<name of input>"`. If the empty string is given (`gha:""`) the field name will be used as input key.
Additional options can be supplied through the tags, separated by comma's:
- required: returns an error if the input is not present or empty string
Example struct:
type Example struct {
RunID string `gha:"run-id,required"`
Directory string `gha:""`
DryRun bool `gha:"dry-run"`
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.