config

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RunsOn      string            `yaml:"runs_on" json:"runs_on" jsonschema:"description=GitHub Actions runner label (e.g. ubuntu-latest),default=ubuntu-latest"`
	Container   *Image            `yaml:"container,omitempty" json:"container,omitempty" jsonschema:"description=Container image to run jobs in (optional)"`
	Env         map[string]string `yaml:"env,omitempty" json:"env,omitempty" jsonschema:"description=Workflow-level environment variables"`
	Permissions map[string]string `` /* 141-byte string literal not displayed */
	JobDefaults *JobDefaults      `yaml:"job_defaults,omitempty" json:"job_defaults,omitempty" jsonschema:"description=Default settings applied to all jobs"`
	Overwrites  []JobOverwrite    `yaml:"overwrites,omitempty" json:"overwrites,omitempty" jsonschema:"description=Job-level overrides for plan or apply jobs"`
}

Config contains GitHub Actions specific settings.

func (*Config) Clone added in v0.10.5

func (c *Config) Clone() *Config

Clone returns a deep copy of the GitHub Actions configuration.

func (*Config) Validate added in v0.10.0

func (c *Config) Validate() error

Validate runs the GitHub plugin's config-shape sanity checks. Called from the plugin's Preflight after DecodeAndSet — fails fast with a descriptive error rather than emitting YAML-shaped garbage in the generated workflow.

Catches obvious shape mistakes (missing runs_on without a container, blank JobOverwrite.Type) and conflicting flags. Skips semantic checks that need network or filesystem access.

type ConfigStep

type ConfigStep struct {
	Name string            `yaml:"name,omitempty" json:"name,omitempty" jsonschema:"description=Step display name"`
	Uses string            `yaml:"uses,omitempty" json:"uses,omitempty" jsonschema:"description=GitHub Action reference"`
	With map[string]string `yaml:"with,omitempty" json:"with,omitempty" jsonschema:"description=Action inputs"`
	Run  string            `yaml:"run,omitempty" json:"run,omitempty" jsonschema:"description=Shell command to run"`
	Env  map[string]string `yaml:"env,omitempty" json:"env,omitempty" jsonschema:"description=Step environment variables"`
}

type Image

type Image = ci.Image

type JobDefaults

type JobDefaults struct {
	RunsOn      string            `yaml:"runs_on,omitempty" json:"runs_on,omitempty" jsonschema:"description=Override runner label"`
	Container   *Image            `yaml:"container,omitempty" json:"container,omitempty" jsonschema:"description=Container image for all jobs"`
	Env         map[string]string `yaml:"env,omitempty" json:"env,omitempty" jsonschema:"description=Additional environment variables"`
	If          string            `yaml:"if,omitempty" json:"if,omitempty" jsonschema:"description=GitHub Actions job condition"`
	Environment string            `yaml:"environment,omitempty" json:"environment,omitempty" jsonschema:"description=GitHub Actions environment name"`
	StepsBefore []ConfigStep      `yaml:"steps_before,omitempty" json:"steps_before,omitempty" jsonschema:"description=Extra steps before terraform commands"`
	StepsAfter  []ConfigStep      `yaml:"steps_after,omitempty" json:"steps_after,omitempty" jsonschema:"description=Extra steps after terraform commands"`
}

type JobOverwrite

type JobOverwrite struct {
	Type        JobOverwriteType  `yaml:"type" json:"type" jsonschema:"description=Type of jobs to override (plan\\, apply\\, or contributed job name),required"`
	RunsOn      string            `yaml:"runs_on,omitempty" json:"runs_on,omitempty" jsonschema:"description=Override runner label"`
	Container   *Image            `yaml:"container,omitempty" json:"container,omitempty" jsonschema:"description=Container image override"`
	Env         map[string]string `yaml:"env,omitempty" json:"env,omitempty" jsonschema:"description=Additional environment variables"`
	If          string            `yaml:"if,omitempty" json:"if,omitempty" jsonschema:"description=GitHub Actions job condition"`
	Environment string            `yaml:"environment,omitempty" json:"environment,omitempty" jsonschema:"description=GitHub Actions environment name"`
	StepsBefore []ConfigStep      `yaml:"steps_before,omitempty" json:"steps_before,omitempty" jsonschema:"description=Extra steps before terraform commands"`
	StepsAfter  []ConfigStep      `yaml:"steps_after,omitempty" json:"steps_after,omitempty" jsonschema:"description=Extra steps after terraform commands"`
}

type JobOverwriteType

type JobOverwriteType string
const (
	OverwriteTypePlan  JobOverwriteType = "plan"
	OverwriteTypeApply JobOverwriteType = "apply"
)

Jump to

Keyboard shortcuts

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