Documentation
¶
Index ¶
- func CompileShortRef(value string) (*proto.Step_Reference, error)
- func GitRefDir(dir string) func(*GitReference)
- func ReadSteps(content string) (*Spec, *Step, error)
- func WriteSteps(spec *Spec, step *Step) (string, error)
- type Exec
- type GitReference
- type Input
- type InputType
- type OCIReference
- type Output
- type OutputType
- type Outputs
- type Reference
- type Signature
- type Spec
- type Step
- type StepInputs
- type StepOutputs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileShortRef ¶ added in v0.9.0
func CompileShortRef(value string) (*proto.Step_Reference, error)
func GitRefDir ¶ added in v0.5.0
func GitRefDir(dir string) func(*GitReference)
Types ¶
type GitReference ¶
type GitReference struct {
Dir *string `yaml:"dir,omitempty"`
Rev string `yaml:"rev"`
Url string `yaml:"url"`
File *string `yaml:"file,omitempty"`
}
GitReference is a reference to a step in a Git repository containing the full set of configuration options.
func NewGitReference ¶ added in v0.5.0
func NewGitReference(url, rev string, options ...func(*GitReference)) *GitReference
type Input ¶
type Input struct {
// Default is the default input value. Its type must match `type`.
Default any `yaml:"default,omitempty"`
// Sensitive implies the input is of sensitive nature and effort should be made to
// prevent accidental disclosure.
Sensitive *bool `yaml:"sensitive,omitempty"`
// Type is the value type of the input.
Type *InputType `yaml:"type,omitempty"`
}
type InputType ¶
type InputType string
InputType is the value type of an input.
const InputTypeArray InputType = "array"
const InputTypeBoolean InputType = "boolean"
const InputTypeNumber InputType = "number"
const InputTypeString InputType = "string"
const InputTypeStruct InputType = "struct"
type OCIReference ¶ added in v0.5.0
type OCIReference struct {
Registry string `yaml:"registry"`
Repository string `yaml:"repository"`
Tag string `yaml:"tag"`
Dir *string `yaml:"dir,omitempty"`
File *string `yaml:"file,omitempty"`
}
OCIReference is a reference to a step in an OCI image that is hosted in an OCI repository.
type Output ¶
type Output struct {
// Default is the default output value.
Default any `yaml:"default,omitempty"`
// Sensitive implies the output is of sensitive nature and effort should be made
// to prevent accidental disclosure.
Sensitive *bool `yaml:"sensitive,omitempty"`
// Type is the value type of the output.
Type *OutputType `yaml:"type,omitempty"`
}
Output describes a single step output.
type OutputType ¶
type OutputType string
const OutputTypeArray OutputType = "array"
const OutputTypeBoolean OutputType = "boolean"
const OutputTypeNumber OutputType = "number"
const OutputTypeString OutputType = "string"
const OutputTypeStruct OutputType = "struct"
type Reference ¶
type Reference struct {
Git *GitReference `yaml:"git,omitempty"`
OCI *OCIReference `yaml:"oci,omitempty"`
}
Reference is a reference to a step in either a Git repository or an OCI image
type Signature ¶
type Signature struct {
Inputs map[string]Input `yaml:"inputs,omitempty"`
Outputs any `yaml:"outputs,omitempty"`
}
Signature contains the inputs and outputs of the step.
type Spec ¶
type Spec struct {
Spec *Signature `yaml:"spec,omitempty"`
}
Spec is a document describing the interface of a step.
type Step ¶
type Step struct {
// Action is a GitHub action to run.
Action *string `json:"action,omitempty" yaml:"action,omitempty"`
// Delegate selects a step by name which will produce the outputs a run.
Delegate *string `json:"delegate,omitempty" yaml:"delegate,omitempty"`
// Env is a map of environment variable names to string values.
Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
// Exec is a command to run.
Exec *Exec `json:"exec,omitempty" yaml:"exec,omitempty"`
// Inputs is a map of step input names to structured values.
Inputs StepInputs `json:"inputs,omitempty" yaml:"inputs,omitempty"`
// Name is a unique identifier for this step.
Name *string `json:"name,omitempty" yaml:"name,omitempty"`
// Outputs are the output values for a sequence. They can reference the outputs of
// sub-steps.
Outputs StepOutputs `json:"outputs,omitempty" yaml:"outputs,omitempty"`
// Script is a shell script to evaluate.
Script *string `json:"script,omitempty" yaml:"script,omitempty"`
// Step is a reference to another step to invoke (deprecated)
Step any `json:"step,omitempty" yaml:"step,omitempty"`
// Func is a reference to a function to invoke
Func any `json:"func,omitempty" yaml:"func,omitempty"`
// Run is a list of sub-steps to run.
Run []Step `json:"run,omitempty" yaml:"run,omitempty"`
}
Step is a unit of execution.
type StepInputs ¶
type StepInputs map[string]interface{}
Inputs is a map of step input names to structured values.
type StepOutputs ¶
type StepOutputs map[string]interface{}
Outputs are the output values for a sequence. They can reference the outputs of sub-steps.
Click to show internal directories.
Click to hide internal directories.