Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLabels ¶
GetLabels gets a list of all labels to build the image with including automatic labels created from github vars when AddGitLabels is true
func GetRegistry ¶
func GetRegistry() string
GetRegistry gets the registry server from the github actions environment variables
func GetTags ¶
GetTags gets a list of all tags for including automatic tags from github vars when enabled along with the registry and repository
func ShouldPush ¶
ShouldPush returns true if the user has signalled a docker push should be performed
Types ¶
type Build ¶
type Build struct { Path string `env:"INPUT_PATH"` Dockerfile string `env:"INPUT_DOCKERFILE"` AddGitLabels bool `env:"INPUT_ADD_GIT_LABELS"` Target string `env:"INPUT_TARGET"` AlwaysPull bool `env:"INPUT_ALWAYS_PULL"` CacheFroms []string BuildArgs []string Labels []string }
Build contains the parsed build action environment variables
func GetBuildOptions ¶
GetBuildOptions gets the login action environment variables
type GitHub ¶
type GitHub struct { RunInActions bool `env:"GITHUB_ACTIONS"` Workflow string `env:"GITHUB_WORKFLOW"` Action string `env:"GITHUB_ACTION"` Repository string `env:"GITHUB_REPOSITORY"` EventName string `env:"GITHUB_EVENT_NAME"` Sha string `env:"GITHUB_SHA"` Reference GitReference }
GitHub contains the parsed common github actions environment variables See https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
func GetGitHubOptions ¶
GetGitHubOptions gets the common github actions environment variables
type GitReference ¶
type GitReference struct { Type GitReferenceType Name string }
GitReference contains the type and name of the git ref
type GitReferenceType ¶
type GitReferenceType int
GitReferenceType is the type of the git ref
const ( GitRefUnknown GitReferenceType = iota GitRefHead GitRefPullRequest GitRefTag )
Get reference types