actions

package module
v0.0.0-...-3ec0b1a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2019 License: MIT Imports: 5 Imported by: 0

README

go-actions

go-actions provides the utilities for Github Actions.

See godoc for more details.

LICENSE

This software is licensed under the MIT license, see LICENSE for more information.

Documentation

Overview

Package actions provides the utilities for Github Actions.

Index

Constants

View Source
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"
)
View Source
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 GetGithubAction

func GetGithubAction() string

GetGithubAction returns the name of action.

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

func LoadPushEvent() (*github.PushEvent, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL