runner

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionInput

type ActionInput struct {
	Description string      `yaml:"description,omitempty"`
	Required    bool        `yaml:"required,omitempty"`
	Default     interface{} `yaml:"default,omitempty"`
}

ActionInput represents an action input parameter

type ActionMetadata

type ActionMetadata struct {
	Name        string                  `yaml:"name,omitempty"`
	Description string                  `yaml:"description,omitempty"`
	Inputs      map[string]ActionInput  `yaml:"inputs,omitempty"`
	Outputs     map[string]ActionOutput `yaml:"outputs,omitempty"`
	Runs        ActionRuns              `yaml:"runs"`
}

ActionMetadata represents the structure of action.yml/action.yaml

type ActionOutput

type ActionOutput struct {
	Description string `yaml:"description,omitempty"`
	Value       string `yaml:"value,omitempty"`
}

ActionOutput represents an action output

type ActionRuns

type ActionRuns struct {
	Using string        `yaml:"using"`
	Main  string        `yaml:"main,omitempty"`
	Steps []schema.Step `yaml:"steps,omitempty"`
	Shell string        `yaml:"shell,omitempty"`
	Run   string        `yaml:"run,omitempty"`
}

ActionRuns specifies how the action is executed

type ParsedUses

type ParsedUses struct {
	IsLocal bool   // true for local paths (./path/to/action)
	Owner   string // GitHub owner
	Repo    string // GitHub repo name
	Path    string // optional path within repo (for sub-actions)
	Version string // version/tag/ref
	Source  string // original source string
}

ParsedUses contains the parsed uses: reference

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner executes workflow steps

func NewRunner

func NewRunner(workflow *schema.Workflow, event *schema.Event, workingDir string) *Runner

NewRunner creates a new step runner

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) ([]StepResult, error)

Run executes all steps in the workflow

func (*Runner) RunWithBlocking

func (r *Runner) RunWithBlocking(ctx context.Context) *schema.WorkflowResult

RunWithBlocking executes all steps and returns a WorkflowResult based on blocking mode If blocking=true and any step fails, returns a deny result with detailed logs If blocking=false, returns an allow result even if steps fail (logs warnings instead)

type StepResult

type StepResult struct {
	Name     string
	Success  bool
	Output   string
	Error    error
	Duration time.Duration
}

StepResult contains the result of running a step

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL