Documentation ¶
Index ¶
- Constants
- Variables
- func ActionToConfigs(globalContext *githubactions.GlobalContext, uses *githubactions.Uses, ...) ([]*forge.ContainerConfig, error)
- func ConfigureGlobalContext(globalContext *githubactions.GlobalContext) *githubactions.GlobalContext
- func GetImageForMetadata(ctx context.Context, containerRuntime forge.ContainerRuntime, ...) (forge.Image, error)
- func GetUsesMetadata(ctx context.Context, uses *githubactions.Uses) (*githubactions.Metadata, error)
- func MetadataToImageReference(actionMetadata *githubactions.Metadata) string
- func NewWorkflowCommandStreams(globalContext *githubactions.GlobalContext, id string, drains *forge.Drains) *forge.Streams
- func UsesToActionDirectory(uses *githubactions.Uses) (string, error)
- func UsesToRootDirectory(uses *githubactions.Uses) (string, error)
- type Mapping
- func (m *Mapping) ActionToConfigs(globalContext *githubactions.GlobalContext, uses *githubactions.Uses, ...) ([]*forge.ContainerConfig, error)
- func (m *Mapping) ConfigureGlobalContext(globalContext *githubactions.GlobalContext) *githubactions.GlobalContext
- func (m *Mapping) GetImageForMetadata(ctx context.Context, containerRuntime forge.ContainerRuntime, ...) (forge.Image, error)
- func (m *Mapping) GetUsesMetadata(ctx context.Context, uses *githubactions.Uses) (*githubactions.Metadata, error)
- func (m *Mapping) UsesToActionDirectory(uses *githubactions.Uses) (string, error)
- func (m *Mapping) UsesToRootDirectory(uses *githubactions.Uses) (string, error)
- type WorkflowCommandWriter
Constants ¶
View Source
const ( // DefaultNode12ImageReference is the default image to use // when an action specifies that it runs using "node12". DefaultNode12ImageReference = "docker.io/library/node:12" // DefaultNode16ImageReference is the default image to use // when an action specifies that it runs using "node16". DefaultNode16ImageReference = "docker.io/library/node:16" )
Variables ¶
View Source
var ( DefaultRootPath = containerfs.WorkingDir DefaultWorkspace = DefaultRootPath + "/workspace" DefaultActionPath = DefaultRootPath + "/action" DefaultRunnerPath = DefaultRootPath + "/runner" DefaultRunnerTemp = DefaultRunnerPath + "/tmp" DefaultRunnerToolCache = DefaultRunnerPath + "/toolcache" DefaultGitHubPath = DefaultRootPath + "/github" DefaultGitHubPathPath = DefaultGitHubPath + "/path.txt" DefaultGitHubEnvPath = DefaultGitHubPath + "/env.txt" )
View Source
var ( // Node12ImageReference is the image to use when an action // when an action specifies that it runs using "node12". // var so as to be overridable. Node12ImageReference = DefaultNode12ImageReference // Node16ImageReference is the image to use when an action // when an action specifies that it runs using "node16". // var so as to be overridable. Node16ImageReference = DefaultNode16ImageReference )
View Source
var DefaultMapping = &Mapping{ Workspace: DefaultWorkspace, ActionPath: DefaultActionPath, RunnerTemp: DefaultRunnerTemp, RunnerToolCache: DefaultRunnerToolCache, GitHubPath: DefaultGitHubPath, GitHubPathPath: DefaultGitHubPathPath, GitHubEnvPath: DefaultGitHubEnvPath, }
Functions ¶
func ActionToConfigs ¶
func ActionToConfigs(globalContext *githubactions.GlobalContext, uses *githubactions.Uses, with, environment map[string]string, actionMetadata *githubactions.Metadata, image forge.Image) ([]*forge.ContainerConfig, error)
func ConfigureGlobalContext ¶
func ConfigureGlobalContext(globalContext *githubactions.GlobalContext) *githubactions.GlobalContext
func GetImageForMetadata ¶ added in v0.2.2
func GetImageForMetadata(ctx context.Context, containerRuntime forge.ContainerRuntime, actionMetadata *githubactions.Metadata, uses *githubactions.Uses) (forge.Image, error)
func GetUsesMetadata ¶
func GetUsesMetadata(ctx context.Context, uses *githubactions.Uses) (*githubactions.Metadata, error)
func MetadataToImageReference ¶
func MetadataToImageReference(actionMetadata *githubactions.Metadata) string
func NewWorkflowCommandStreams ¶
func NewWorkflowCommandStreams(globalContext *githubactions.GlobalContext, id string, drains *forge.Drains) *forge.Streams
func UsesToActionDirectory ¶
func UsesToActionDirectory(uses *githubactions.Uses) (string, error)
func UsesToRootDirectory ¶
func UsesToRootDirectory(uses *githubactions.Uses) (string, error)
Types ¶
type Mapping ¶
type Mapping struct { ActionPath string `json:"action_path,omitempty"` Workspace string `json:"workspace,omitempty"` RunnerToolCache string `json:"runner_tool_cache,omitempty"` RunnerTemp string `json:"runner_temp,omitempty"` GitHubPath string `json:"git_hub_path,omitempty"` GitHubPathPath string `json:"git_hub_path_path,omitempty"` GitHubEnvPath string `json:"git_hub_env_path,omitempty"` }
func (*Mapping) ActionToConfigs ¶
func (m *Mapping) ActionToConfigs(globalContext *githubactions.GlobalContext, uses *githubactions.Uses, with, environment map[string]string, actionMetadata *githubactions.Metadata, image forge.Image) ([]*forge.ContainerConfig, error)
func (*Mapping) ConfigureGlobalContext ¶
func (m *Mapping) ConfigureGlobalContext(globalContext *githubactions.GlobalContext) *githubactions.GlobalContext
func (*Mapping) GetImageForMetadata ¶ added in v0.2.2
func (m *Mapping) GetImageForMetadata(ctx context.Context, containerRuntime forge.ContainerRuntime, actionMetadata *githubactions.Metadata, uses *githubactions.Uses) (forge.Image, error)
func (*Mapping) GetUsesMetadata ¶
func (m *Mapping) GetUsesMetadata(ctx context.Context, uses *githubactions.Uses) (*githubactions.Metadata, error)
func (*Mapping) UsesToActionDirectory ¶
func (m *Mapping) UsesToActionDirectory(uses *githubactions.Uses) (string, error)
func (*Mapping) UsesToRootDirectory ¶
func (m *Mapping) UsesToRootDirectory(uses *githubactions.Uses) (string, error)
type WorkflowCommandWriter ¶ added in v0.2.0
type WorkflowCommandWriter struct { *githubactions.GlobalContext ID string StopCommandsTokens map[string]bool State map[string]string Debug bool }
func (*WorkflowCommandWriter) Callback ¶ added in v0.2.0
func (w *WorkflowCommandWriter) Callback(wc *githubactions.WorkflowCommand) []byte
Click to show internal directories.
Click to hide internal directories.