Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Identifier string Uses Uses Runs, Args Command Needs []string Env map[string]string Secrets []string }
Action represents a single "action" stanza in a .workflow file.
type Command ¶
type Command interface { Split() []string // contains filtered or unexported methods }
Command represents the optional "runs" and "args" attributes. Each one takes one of two forms:
- runs="entrypoint arg1 arg2 ..."
- runs=[ "entrypoint", "arg1", "arg2", ... ]
type Configuration ¶
Configuration is a parsed main.workflow file
func (*Configuration) GetAction ¶
func (c *Configuration) GetAction(id string) *Action
GetAction looks up action by identifier.
If the action is not found, nil is returned.
func (*Configuration) GetWorkflow ¶
func (c *Configuration) GetWorkflow(id string) *Workflow
GetWorkflow looks up a workflow by identifier.
If the workflow is not found, nil is returned.
func (*Configuration) GetWorkflows ¶
func (c *Configuration) GetWorkflows(eventType string) []*Workflow
GetWorkflows gets all Workflow structures that match a given type of event. e.g., GetWorkflows("push")
type ListCommand ¶
type ListCommand struct {
Values []string
}
ListCommand represents the list based form of the "runs" or "args" attribute.
- runs=[ "entrypoint", "arg1", "arg2", ... ]
func (*ListCommand) Split ¶
func (l *ListCommand) Split() []string
type StringCommand ¶
type StringCommand struct {
Value string
}
StringCommand represents the string based form of the "runs" or "args" attribute.
- runs="entrypoint arg1 arg2 ..."
func (*StringCommand) Split ¶
func (s *StringCommand) Split() []string
type UsesDockerImage ¶
type UsesDockerImage struct {
Image string
}
UsesDockerImage represents `uses = "docker://<image>"`
func (*UsesDockerImage) String ¶
func (u *UsesDockerImage) String() string
type UsesInvalid ¶
type UsesInvalid struct {
Raw string
}
UsesInvalid represents any invalid `uses = "<raw>"` value
func (*UsesInvalid) String ¶
func (u *UsesInvalid) String() string
type UsesRepository ¶
UsesRepository represents `uses = "<owner>/<repo>[/<path>]@<ref>"`
func (*UsesRepository) String ¶
func (u *UsesRepository) String() string