github

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Concurrency added in v0.6.0

type Concurrency struct {
	Group            string `yaml:"group"`
	CancelInProgress bool   `yaml:"cancel-in-progress"`
}

Concurrency describes how concurrent workflows should be handled.

type FailFast

type FailFast bool

FailFast represents the fail-fast boolean.

func (FailFast) IsZero

func (ff FailFast) IsZero() bool

IsZero determines whether the boolean is in a "zero" state.

type Job

type Job struct {
	Strategy Strategy          `yaml:"strategy,omitempty"`
	RunsOn   string            `yaml:"runs-on"`
	Needs    []string          `yaml:"needs,omitempty"`
	If       string            `yaml:"if,omitempty"`
	Env      map[string]string `yaml:"env,omitempty"`
	Steps    []Step            `yaml:"steps"`
}

Job describes a GitHub actions workflow job.

func (*Job) UnmarshalYAML

func (j *Job) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML applies custom logic for the unmarshalling of a job from YAML.

type MergeGroup added in v0.24.0

type MergeGroup struct{}

type PullRequestEvent

type PullRequestEvent struct {
	Branches []string `yaml:"branches,omitempty"`
}

PullRequestEvent is a trigger event.

type SBMatrixInclude

type SBMatrixInclude struct {
	Example string `yaml:"example,omitempty"`
	Test    string `yaml:"test"`
	Runner  string `yaml:"runner"`
}

SBMatrixInclude is the include for the job execution matrix.

type SBMatrixStrategy

type SBMatrixStrategy struct {
	Example []string          `yaml:"example,omitempty"`
	Runner  []string          `yaml:"runner,omitempty"`
	Include []SBMatrixInclude `yaml:"include,omitempty"`
}

SBMatrixStrategy is the job execution matrix.

type Schedule

type Schedule struct {
	Cron string `yaml:"cron"`
}

Schedule is the cron schedule for a workflow.

type Step

type Step struct {
	Uses  string            `yaml:"uses,omitempty"`
	If    string            `yaml:"if,omitempty"`
	With  map[string]string `yaml:"with,omitempty"`
	Name  string            `yaml:"name,omitempty"`
	Shell string            `yaml:"shell,omitempty"`
	Run   string            `yaml:"run,omitempty"`
}

Step is a step in a job.

type Strategy

type Strategy struct {
	FailFast FailFast         `yaml:"fail-fast,omitempty" default:"true"`
	Matrix   SBMatrixStrategy `yaml:"matrix,omitempty"`
}

Strategy describes execution parameter matrix for a job.

func (*Strategy) UnmarshalYAML

func (s *Strategy) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML applies custom logic for the unmarshalling of a strategy from YAML.

type Workflow

type Workflow struct {
	Name        string           `yaml:"name"`
	On          WorkflowTriggers `yaml:"on"`
	Concurrecny Concurrency      `yaml:"concurrency"`
	Jobs        map[string]Job   `yaml:"jobs" default:"{}"`
}

Workflow is a GitHub Actions workflow

func NewWorkflowFromYAML

func NewWorkflowFromYAML(b []byte) (*Workflow, error)

NewWorkflowFromYAML returns a new workflow from YAML bytes.

type WorkflowTriggers

type WorkflowTriggers struct {
	PullRequest PullRequestEvent `yaml:"pull_request"`
	MergeGroup  MergeGroup       `yaml:"merge_group"`
	Schedule    []Schedule       `yaml:"schedule,omitempty"`
}

WorkflowTriggers represents the triggers for a workflow.

Jump to

Keyboard shortcuts

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