Documentation ¶
Index ¶
- Constants
- func WriteInputsAsGHActionYAML(w io.Writer, defs []InputDef) (i int64, err error)
- func WriteRunsAsGHActionYAML(w io.Writer, runs DockerAction) (i int64, err error)
- func WriteTo(w io.Writer) (i int64, err error)
- type BoolInputDef
- type BrandingColor
- type BrandingIcon
- type Desc
- type DockerAction
- type DockerImage
- type GHActionsMetadata
- type InputDef
- type IntInputDef
- type Name
- type StringInputDef
Constants ¶
View Source
const ( BrandingIconCheck BrandingIcon = "check" BrandingColorBlue BrandingColor = "blue" )
View Source
const ImageName = "ghcr.io/dena/unity-meta-check/unity-meta-check-gh-action"
Variables ¶
This section is empty.
Functions ¶
func WriteRunsAsGHActionYAML ¶
func WriteRunsAsGHActionYAML(w io.Writer, runs DockerAction) (i int64, err error)
Types ¶
type BoolInputDef ¶
type BoolInputDef struct {
// contains filtered or unexported fields
}
func (BoolInputDef) DefaultValueAsYAML ¶
func (b BoolInputDef) DefaultValueAsYAML() string
func (BoolInputDef) Desc ¶
func (b BoolInputDef) Desc() Desc
func (BoolInputDef) Name ¶
func (b BoolInputDef) Name() Name
func (BoolInputDef) Required ¶
func (b BoolInputDef) Required() bool
type BrandingColor ¶
type BrandingColor string
type BrandingIcon ¶
type BrandingIcon string
type DockerAction ¶
type DockerAction struct { // Image is the Docker image to use as the container to run the action. The value can be the Docker base image name, // a local Dockerfile in your repository, or a public image in Docker Hub or another registry. // To reference a Dockerfile local to your repository, the file must be named Dockerfile and you must use a path // relative to your action metadata file. The docker application will execute this file. // SEE: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsimage Image DockerImage // Env specifies a key/value map of environment variables to set in the container environment. // SEE: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsenv Env map[string]string // Args is an array of strings that define the inputs for a Docker container. Inputs can include hardcoded strings. // GitHub passes the args to the container's ENTRYPOINT when the container starts up. // The args are used in place of the CMD instruction in a Dockerfile. If you use CMD in your Dockerfile, use the guidelines ordered by preference: // 1. Document required arguments in the action's README and omit them from the CMD instruction. // 2. Use defaults that allow using the action without specifying any args. // 3. If the action exposes a --help flag, or something similar, use that to make your action self-documenting. // If you need to pass environment variables into an action, make sure your action runs a command shell to perform variable substitution. // For example, if your entrypoint attribute is set to "sh -c", args will be run in a command shell. // Alternatively, if your Dockerfile uses an ENTRYPOINT to run the same command ("sh -c"), // args will execute in a command shell. // // For more information about using the CMD instruction with GitHub Actions, see "Dockerfile support for GitHub Actions." // SEE: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsargs Args []string }
type DockerImage ¶
type DockerImage string
func ImageWithTag ¶
func ImageWithTag(version string) DockerImage
type GHActionsMetadata ¶
type GHActionsMetadata struct { // Name is the name of your action. GitHub displays the name in the Actions tab to help visually identify actions in each job. // SEE: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#name Name string // Author is the name of the action's author. // SEE: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#author Author string // Description is a short description of the action. // SEE: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#description Description string // Inputs is Input parameters allow you to specify data that the action expects to use during runtime. // GitHub stores input parameters as environment variables. Input ids with uppercase letters are converted to lowercase during runtime. // We recommended using lowercase input ids. // SEE: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#inputs Inputs []InputDef // Runs configures the image used for the Docker action. // SEE: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-docker-actions Runs DockerAction // BrandingIcon is the name of the Feather icon to use. // SEE: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#brandingicon BrandingIcon BrandingIcon // BrandingColor is the background color of the badge. Can be one of: white, yellow, blue, green, orange, red, purple, or gray-dark. // SEE: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#brandingcolor BrandingColor BrandingColor }
func BuildMetadata ¶
func BuildMetadata() GHActionsMetadata
type IntInputDef ¶
type IntInputDef struct {
// contains filtered or unexported fields
}
func (IntInputDef) DefaultValueAsYAML ¶
func (u IntInputDef) DefaultValueAsYAML() string
func (IntInputDef) Desc ¶
func (u IntInputDef) Desc() Desc
func (IntInputDef) Name ¶
func (u IntInputDef) Name() Name
func (IntInputDef) Required ¶
func (u IntInputDef) Required() bool
type StringInputDef ¶
type StringInputDef struct {
// contains filtered or unexported fields
}
func (StringInputDef) DefaultValueAsYAML ¶
func (s StringInputDef) DefaultValueAsYAML() string
func (StringInputDef) Desc ¶
func (s StringInputDef) Desc() Desc
func (StringInputDef) Name ¶
func (s StringInputDef) Name() Name
func (StringInputDef) Required ¶
func (s StringInputDef) Required() bool
Click to show internal directories.
Click to hide internal directories.