Documentation
¶
Index ¶
Constants ¶
View Source
const ( // SummaryJobName is the name of the summary job SummaryJobName = "terraci-summary" // PolicyCheckJobName is the name of the policy check job PolicyCheckJobName = "policy-check" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Concurrency ¶
type Concurrency struct {
Group string `yaml:"group"`
CancelInProgress bool `yaml:"cancel-in-progress"`
}
Concurrency controls concurrent runs
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates GitHub Actions workflows
func NewGenerator ¶
func NewGenerator(cfg *config.GitHubConfig, policyCfg *config.PolicyConfig, depGraph *graph.DependencyGraph, modules []*discovery.Module) *Generator
NewGenerator creates a new GitHub Actions pipeline generator
type Job ¶
type Job struct {
Name string `yaml:"name,omitempty"`
RunsOn string `yaml:"runs-on"`
Container *Container `yaml:"container,omitempty"`
Needs []string `yaml:"needs,omitempty"`
If string `yaml:"if,omitempty"`
Environment string `yaml:"environment,omitempty"`
Concurrency *Concurrency `yaml:"concurrency,omitempty"`
Env map[string]string `yaml:"env,omitempty"`
Steps []Step `yaml:"steps"`
}
Job represents a workflow job
type PRTrigger ¶
type PRTrigger struct {
Branches []string `yaml:"branches,omitempty"`
}
PRTrigger limits pull request events
type PushTrigger ¶
type PushTrigger struct {
Branches []string `yaml:"branches,omitempty"`
}
PushTrigger limits push events
type Step ¶
type Step struct {
Name string `yaml:"name,omitempty"`
Uses string `yaml:"uses,omitempty"`
With map[string]string `yaml:"with,omitempty"`
Run string `yaml:"run,omitempty"`
Env map[string]string `yaml:"env,omitempty"`
If string `yaml:"if,omitempty"`
}
Step is one step in a job
type Workflow ¶
type Workflow struct {
Name string `yaml:"name"`
On WorkflowTrigger `yaml:"on"`
Permissions map[string]string `yaml:"permissions,omitempty"`
Env map[string]string `yaml:"env,omitempty"`
Concurrency *Concurrency `yaml:"concurrency,omitempty"`
Jobs map[string]*Job `yaml:"jobs"`
}
Workflow represents a GitHub Actions workflow
type WorkflowTrigger ¶
type WorkflowTrigger struct {
Push *PushTrigger `yaml:"push,omitempty"`
PullRequest *PRTrigger `yaml:"pull_request,omitempty"`
WorkflowDispatch any `yaml:"workflow_dispatch,omitempty"`
}
WorkflowTrigger defines when the workflow runs
Click to show internal directories.
Click to hide internal directories.