Documentation
¶
Overview ¶
Copyright 2026 YLD Limited SPDX-License-Identifier: Apache-2.0 Package action contains HCL configuration types and parsing logic for GitHub Actions step-level blocks: uses (action references), with (input parameters), and env (environment variables).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateUsesRef ¶
ValidateUsesRef checks that a step 'uses' value follows a valid format:
- {owner}/{repo}@{ref}
- {owner}/{repo}/{path}@{ref}
- ./local/path
- docker://{image}
Types ¶
type EnvConfig ¶
type EnvConfig struct {
Name hcl.Expression `hcl:"name,attr"`
Value hcl.Expression `hcl:"value,attr"`
}
EnvConfig represents the HCL configuration for a single env block.
type EnvListConfig ¶
type EnvListConfig []EnvConfig
EnvListConfig is a slice of EnvConfig decoded from HCL env blocks.
type Uses ¶
type Uses struct {
Action cty.Value `yaml:"action,omitempty"`
Version cty.Value `yaml:"version,omitempty"`
}
Uses holds the parsed action reference and optional version.
type UsesConfig ¶
type UsesConfig struct {
Action hcl.Expression `hcl:"action,attr"`
Version hcl.Expression `hcl:"version,attr"`
}
UsesConfig represents the HCL configuration for a uses block.
type UsesListConfig ¶
type UsesListConfig []UsesConfig
UsesListConfig is a slice of UsesConfig decoded from HCL uses blocks.
type WithConfig ¶
type WithConfig struct {
Name hcl.Expression `hcl:"name,attr"`
Value hcl.Expression `hcl:"value,attr"`
}
WithConfig represents the HCL configuration for a single with block.
type WithListConfig ¶
type WithListConfig []WithConfig
WithListConfig is a slice of WithConfig decoded from HCL with blocks.