Documentation ¶
Overview ¶
Package actions provides the utilities for Github Actions.
Index ¶
- Constants
- func GetDirContainsCopyOfRepository() string
- func GetGithubAction() string
- func GetGithubActor() string
- func GetGithubEventName() string
- func GetGithubEventPath() string
- func GetGithubRef() string
- func GetGithubRepository() string
- func GetGithubSHA() string
- func GetGithubToken() string
- func GetGithubWorkflow() string
- func GetGithubWorkspace() string
- func GetHome() string
- func GetTagOrBranchName() string
- func LoadPushEvent() (*github.PushEvent, error)
Constants ¶
const ( // GithubHome is a directory containing user-related data. GithubHome = "/github/home" // GithubWorkspace is the working directory of the DockerContainer. GithubWorkspace = "/github/workspace" // GithubPostEventJSONPATH specifies the path of the POST response of the webhook event. GithubPostEventJSONPATH = "/github/workflow/event.jso" )
const ( // ExitSuccess means the action completed successfully. ExitSuccess = 0 // ExitNeutral to terminates all concurrently running actions and prevents any future actions from starting. ExitNeutral = 78 )
Variables ¶
This section is empty.
Functions ¶
func GetDirContainsCopyOfRepository ¶
func GetDirContainsCopyOfRepository() string
GetDirContainsCopyOfRepository the directory path contains a copy of the repository.
func GetGithubActor ¶
func GetGithubActor() string
GetGithubActor returns the name of the person or app that initiated the workflow.
func GetGithubEventName ¶
func GetGithubEventName() string
GetGithubEventName returns the webhook name of the event that triggered the workflow.
func GetGithubEventPath ¶
func GetGithubEventPath() string
GetGithubEventPath returns the path to a file that contains the payload of the event that triggered the workflow.
func GetGithubRef ¶
func GetGithubRef() string
GetGithubRef returns the branch or tag ref that triggered the workflow.
func GetGithubRepository ¶
func GetGithubRepository() string
GetGithubRepository returns the owner and repository name.
func GetGithubSHA ¶
func GetGithubSHA() string
GetGithubSHA returns the commit SHA that triggered the workflow.
func GetGithubToken ¶
func GetGithubToken() string
GetGithubToken returns a GitHub App installation token scoped to the repository containing the workflow file.
func GetGithubWorkflow ¶
func GetGithubWorkflow() string
GetGithubWorkflow returns the name of the workflow.
func GetGithubWorkspace ¶
func GetGithubWorkspace() string
GetGithubWorkspace returns the GitHub workspace path.
func GetHome ¶
func GetHome() string
GetHome returns the path to the GitHub home directory used to store user data. Value: /github/home.
func GetTagOrBranchName ¶
func GetTagOrBranchName() string
GetTagOrBranchName returns the branch or tag name that triggered the workflow.
func LoadPushEvent ¶
LoadPushEvent returns the POST response of the webhook event that triggered the workflow. The result is globally cached. It's no problem because this cache is cleared at ends of actions.
Types ¶
This section is empty.