workflow

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDotGithub

type IDotGithub interface {
	action.IDotGithub
	IsVarsFileExist() bool
	IsSecretsFileExist() bool
	IsVarExist(n string) bool
	IsSecretExist(n string) bool
}

type Workflow

type Workflow struct {
	Path        string
	Raw         []byte
	FileName    string
	Name        string                  `yaml:"name"`
	Description string                  `yaml:"description"`
	Env         map[string]string       `yaml:"env"`
	Jobs        map[string]*WorkflowJob `yaml:"jobs"`
	On          *WorkflowOn             `yaml:"on"`
}

func (*Workflow) Init

func (w *Workflow) Init() error

func (*Workflow) Validate

func (w *Workflow) Validate(d IDotGithub) ([]string, error)

type WorkflowCall

type WorkflowCall struct {
	Inputs map[string]*WorkflowInput `yaml:"inputs"`
}

func (*WorkflowCall) Validate

func (wc *WorkflowCall) Validate(workflow string) ([]string, error)

type WorkflowDispatch

type WorkflowDispatch struct {
	Inputs map[string]*WorkflowInput `yaml:"inputs"`
}

func (*WorkflowDispatch) Validate

func (wd *WorkflowDispatch) Validate(workflow string) ([]string, error)

type WorkflowInput

type WorkflowInput struct {
	Description string `yaml:"description"`
	Default     string `yaml:"default"`
	Required    bool   `yaml:"required"`
}

func (*WorkflowInput) Validate

func (wi *WorkflowInput) Validate(workflow string, placement string, name string) ([]string, error)

type WorkflowJob

type WorkflowJob struct {
	Name   string               `yaml:"name"`
	Uses   string               `yaml:"uses"`
	RunsOn interface{}          `yaml:"runs-on"`
	Steps  []*action.ActionStep `yaml:"steps"`
	Env    map[string]string    `yaml:"env"`
	Needs  interface{}          `yaml:"needs,omitempty"`
}

func (*WorkflowJob) IsStepExist

func (wj *WorkflowJob) IsStepExist(id string) bool

func (*WorkflowJob) IsStepOutputExist

func (wj *WorkflowJob) IsStepOutputExist(step string, output string, d IDotGithub) int

func (*WorkflowJob) SetParentType

func (wj *WorkflowJob) SetParentType(t string)

func (*WorkflowJob) Validate

func (wj *WorkflowJob) Validate(workflow string, job string, d IDotGithub) ([]string, error)

type WorkflowOn

type WorkflowOn struct {
	WorkflowCall     *WorkflowCall     `yaml:"workflow_call"`
	WorkflowDispatch *WorkflowDispatch `yaml:"workflow_dispatch"`
}

func (*WorkflowOn) Validate

func (wo *WorkflowOn) Validate(workflow string) ([]string, error)

Jump to

Keyboard shortcuts

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