Documentation
¶
Index ¶
- Constants
- Variables
- func EvalBool(ctx context.Context, evaluator ExpressionEvaluator, expr string, ...) (bool, error)
- func Masks(ctx context.Context) *[]string
- func WithCompositeLogger(ctx context.Context, masks *[]string) context.Context
- func WithCompositeStepLogger(ctx context.Context, stepID string) context.Context
- func WithJobLogger(ctx context.Context, jobID string, jobName string, config *Config, ...) context.Context
- func WithMasks(ctx context.Context, masks *[]string) context.Context
- type Config
- type ExpressionEvaluator
- type MappableOutput
- type RunContext
- func (rc *RunContext) ActionCacheDir() string
- func (rc *RunContext) AddMask(mask string)
- func (rc *RunContext) Executor() common.Executor
- func (rc *RunContext) GetBindsAndMounts() ([]string, map[string]string)
- func (rc *RunContext) GetEnv() map[string]string
- func (rc *RunContext) NewExpressionEvaluator(ctx context.Context) ExpressionEvaluator
- func (rc *RunContext) NewStepExpressionEvaluator(ctx context.Context, step step) ExpressionEvaluator
- func (rc *RunContext) String() string
- type Runner
Constants ¶
View Source
const ActPath string = "/var/run/act"
Variables ¶
View Source
var (
ContainerNewContainer = container.NewContainer
)
Functions ¶
func EvalBool ¶ added in v0.2.26
func EvalBool(ctx context.Context, evaluator ExpressionEvaluator, expr string, defaultStatusCheck exprparser.DefaultStatusCheck) (bool, error)
EvalBool evaluates an expression against given evaluator
func WithCompositeLogger ¶ added in v0.2.27
func WithCompositeStepLogger ¶ added in v0.2.30
Types ¶
type Config ¶
type Config struct { Actor string // the user that triggered the event Workdir string // path to working directory BindWorkdir bool // bind the workdir to the job container EventName string // name of event to run EventPath string // path to JSON file to use for event.json in containers DefaultBranch string // name of the main branch for this repository ReuseContainers bool // reuse containers to maintain state ForcePull bool // force pulling of the image, even if already present ForceRebuild bool // force rebuilding local docker image action LogOutput bool // log the output from docker run JSONLogger bool // use json or text logger Env map[string]string // env for containers Secrets map[string]string // list of secrets Token string // GitHub token InsecureSecrets bool // switch hiding output when printing to terminal Platforms map[string]string // list of platforms Privileged bool // use privileged mode UsernsMode string // user namespace to use ContainerArchitecture string // Desired OS/architecture platform for running containers ContainerDaemonSocket string // Path to Docker daemon socket UseGitIgnore bool // controls if paths in .gitignore should not be copied into container, default true GitHubInstance string // GitHub instance to use, default "github.com" ContainerCapAdd []string // list of kernel capabilities to add to the containers ContainerCapDrop []string // list of kernel capabilities to remove from the containers AutoRemove bool // controls if the container is automatically removed upon workflow completion ArtifactServerPath string // the path where the artifact server stores uploads ArtifactServerPort string // the port the artifact server binds to NoSkipCheckout bool // do not skip actions/checkout RemoteName string // remote name in local git repo config ReplaceGheActionWithGithubCom []string // Use actions from GitHub Enterprise instance to GitHub ReplaceGheActionTokenWithGithubCom string // Token of private action repo on GitHub. }
Config contains the config for a new runner
func (*Config) ContainerWorkdir ¶ added in v0.2.22
Resolves the equivalent host path inside the container This is required for windows and WSL 2 to translate things like C:\Users\Myproject to /mnt/users/Myproject
type ExpressionEvaluator ¶
type ExpressionEvaluator interface { EvaluateYamlNode(context.Context, *yaml.Node) error Interpolate(context.Context, string) string // contains filtered or unexported methods }
ExpressionEvaluator is the interface for evaluating expressions
type MappableOutput ¶ added in v0.2.22
type RunContext ¶
type RunContext struct { Name string Config *Config Matrix map[string]interface{} Run *model.Run EventJSON string Env map[string]string ExtraPath []string CurrentStep string StepResults map[string]*model.StepResult ExprEval ExpressionEvaluator JobContainer container.Container OutputMappings map[MappableOutput]MappableOutput JobName string ActionPath string ActionRef string ActionRepository string Inputs map[string]interface{} Parent *RunContext Masks []string }
RunContext contains info about current job
func (*RunContext) ActionCacheDir ¶ added in v0.2.2
func (rc *RunContext) ActionCacheDir() string
ActionCacheDir is for rc
func (*RunContext) AddMask ¶ added in v0.2.26
func (rc *RunContext) AddMask(mask string)
func (*RunContext) Executor ¶
func (rc *RunContext) Executor() common.Executor
Executor returns a pipeline executor for all the steps in the job
func (*RunContext) GetBindsAndMounts ¶ added in v0.2.22
func (rc *RunContext) GetBindsAndMounts() ([]string, map[string]string)
Returns the binds and mounts for the container, resolving paths as appopriate
func (*RunContext) GetEnv ¶
func (rc *RunContext) GetEnv() map[string]string
GetEnv returns the env for the context
func (*RunContext) NewExpressionEvaluator ¶
func (rc *RunContext) NewExpressionEvaluator(ctx context.Context) ExpressionEvaluator
NewExpressionEvaluator creates a new evaluator
func (*RunContext) NewStepExpressionEvaluator ¶
func (rc *RunContext) NewStepExpressionEvaluator(ctx context.Context, step step) ExpressionEvaluator
NewExpressionEvaluator creates a new evaluator
func (*RunContext) String ¶ added in v0.2.5
func (rc *RunContext) String() string
Click to show internal directories.
Click to hide internal directories.