Documentation ¶
Index ¶
- Constants
- type Actions
- type Context
- type ContextEnvironment
- type ContextType
- type CurrentBuildEnvironment
- type Event
- type EventMetadata
- type Github
- type GithubCIEnvironment
- func (in *GithubCIEnvironment) BuildInvocationId() string
- func (in *GithubCIEnvironment) BuildType() string
- func (in *GithubCIEnvironment) BuilderId() string
- func (in *GithubCIEnvironment) Context() string
- func (in *GithubCIEnvironment) CurrentFilteredEnvironment() map[string]string
- func (in *GithubCIEnvironment) GetEvent() *Event
- func (in *GithubCIEnvironment) NonReproducibleMetadata() *Metadata
- func (in *GithubCIEnvironment) RepoUri() string
- func (in *GithubCIEnvironment) Sha() string
- func (in *GithubCIEnvironment) UserDefinedParameters() *Event
- type GithubContext
- type HeadCommit
- type Metadata
- type PullRequest
- type Runner
- type RunnerContext
- type WorkFlow
Constants ¶
View Source
const (
GithubActionsBuildIdVersion = "v1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextEnvironment ¶
type ContextEnvironment interface { BuilderId() string BuildInvocationId() string BuildType() string Context() string CurrentFilteredEnvironment() map[string]string NonReproducibleMetadata() *Metadata UserDefinedParameters() *Event RepoUri() string Sha() string GetEvent() *Event }
func BuildEnvironment ¶
func BuildEnvironment(context *GithubContext, runner *RunnerContext, current *CurrentBuildEnvironment, event *Event) ContextEnvironment
func CreateGithubCIEnvironment ¶
func CreateGithubCIEnvironment(githubContext []byte, runnerContext, envsContext *string) (ContextEnvironment, error)
func ResolveBuildContext ¶
func ResolveBuildContext(context, runner, env *string) (ContextEnvironment, error)
type ContextType ¶
type ContextType string
const (
ContextTypeGithub ContextType = "GITHUB_ACTIONS"
)
func (ContextType) Hosted ¶
func (in ContextType) Hosted() bool
func (ContextType) String ¶
func (in ContextType) String() string
type CurrentBuildEnvironment ¶ added in v0.8.20230131140132
func ParseBuild ¶ added in v0.8.20230131140132
func ParseBuild(envs *string) (*CurrentBuildEnvironment, error)
func (*CurrentBuildEnvironment) FilterEnvs ¶ added in v0.8.20230131140132
func (in *CurrentBuildEnvironment) FilterEnvs() map[string]string
func (*CurrentBuildEnvironment) GetEnvs ¶ added in v0.8.20230131140132
func (in *CurrentBuildEnvironment) GetEnvs() map[string]string
type Event ¶
type Event struct {
EventMetadata *EventMetadata `json:"event"`
}
func ParseEvent ¶ added in v0.8.20230131140132
func (*Event) GetHeadCommitTimestamp ¶ added in v0.8.20230131140132
type EventMetadata ¶ added in v0.8.20230131140132
type EventMetadata struct { HeadCommit *HeadCommit `json:"head_commit"` PullRequest *PullRequest `json:"pull_request"` WorkFlowRun *WorkFlow `json:"workflow_run"` }
type GithubCIEnvironment ¶
type GithubCIEnvironment struct { BuildContext *GithubContext Event *Event RunnerContext *RunnerContext BuildEnvironment *CurrentBuildEnvironment Actions *Actions }
func (*GithubCIEnvironment) BuildInvocationId ¶
func (in *GithubCIEnvironment) BuildInvocationId() string
func (*GithubCIEnvironment) BuildType ¶
func (in *GithubCIEnvironment) BuildType() string
func (*GithubCIEnvironment) BuilderId ¶
func (in *GithubCIEnvironment) BuilderId() string
func (*GithubCIEnvironment) Context ¶
func (in *GithubCIEnvironment) Context() string
func (*GithubCIEnvironment) CurrentFilteredEnvironment ¶
func (in *GithubCIEnvironment) CurrentFilteredEnvironment() map[string]string
func (*GithubCIEnvironment) GetEvent ¶ added in v0.8.20230131140132
func (in *GithubCIEnvironment) GetEvent() *Event
func (*GithubCIEnvironment) NonReproducibleMetadata ¶
func (in *GithubCIEnvironment) NonReproducibleMetadata() *Metadata
func (*GithubCIEnvironment) RepoUri ¶
func (in *GithubCIEnvironment) RepoUri() string
func (*GithubCIEnvironment) Sha ¶
func (in *GithubCIEnvironment) Sha() string
func (*GithubCIEnvironment) UserDefinedParameters ¶
func (in *GithubCIEnvironment) UserDefinedParameters() *Event
type GithubContext ¶ added in v0.8.20230131140132
type GithubContext struct { Action string `json:"action"` Actor string `json:"actor"` Event json.RawMessage `json:"event"` EventName string `json:"event_name"` EventPath string `json:"event_path"` Job string `json:"job"` Ref string `json:"ref"` Repository string `json:"repository"` RepositoryOwner string `json:"repository_owner"` RunId string `json:"run_id"` RunNumber string `json:"run_number"` ServerUrl string `json:"server_url"` SHA string `json:"sha"` Token string `json:"token,omitempty"` Workflow string `json:"workflow"` Workspace string `json:"workspace"` }
func ParseContext ¶ added in v0.8.20230131140132
func ParseContext(github []byte) (*GithubContext, error)
type HeadCommit ¶ added in v0.8.20230131140132
type HeadCommit struct {
Timestamp string `json:"timestamp"`
}
type PullRequest ¶ added in v0.8.20230131140132
type PullRequest struct {
UpdatedAt string `json:"updated_at"`
}
type RunnerContext ¶ added in v0.8.20230131140132
type RunnerContext struct { Name string `json:"name"` Arch string `json:"arch"` OS string `json:"os"` Temp string `json:"temp"` ToolCache string `json:"tool_cache"` }
func ParseRunner ¶ added in v0.8.20230131140132
func ParseRunner(runner *string) (*RunnerContext, error)
type WorkFlow ¶ added in v0.8.20230131140132
type WorkFlow struct {
HeadCommit *HeadCommit `json:"head_commit"`
}
Click to show internal directories.
Click to hide internal directories.