Documentation ¶
Index ¶
- Constants
- func AddPath(path string)
- func AddStepSummary(summary string)
- func Debug(message string)
- func Debugf(format string, args ...interface{})
- func DeleteStepSummary()
- func EndGroup()
- func Error(message string)
- func Errorf(format string, args ...interface{})
- func ExportVariable(name, value string)
- func GetBoolInput(name string) bool
- func GetInput(name string) (string, bool)
- func GetInputOrDefault(name, dflt string) string
- func GetState(name string) string
- func Group(name string, f func()) func()
- func Info(message string)
- func Infof(format string, args ...interface{})
- func IsDebug() bool
- func Issue(kind string, message ...string)
- func IssueCommand(kind string, properties map[string]string, message string)
- func ReplaceStepSummary(summary string)
- func SaveState(name, value string)
- func SetFailed(message string)
- func SetFailedf(format string, args ...interface{})
- func SetOutput(name, value string)
- func SetSecret(secret string)
- func SetStdout(w io.Writer)
- func StartCommands(endToken string)
- func StartGroup(name string)
- func StopCommands(endToken string)
- func Warning(message string)
- func Warningf(format string, args ...interface{})
- func WithoutCommands(endToken string, f func())
- type File
Constants ¶
const ( // StatusFailed is returned by Status() in case this action has been marked as failed StatusFailed = 1 // StatusSuccess is returned by Status() in case this action has not been marked as failed. By default an action is claimed as successful StatusSuccess = 0 GitHubOutputFilePathEnvName = "GITHUB_OUTPUT" GitHubStateFilePathEnvName = "GITHUB_STATE" GitHubExportEnvFilePathEnvName = "GITHUB_ENV" GitHubPathFilePathEnvName = "GITHUB_PATH" GitHubSummaryPathEnvName = "GITHUB_STEP_SUMMARY" ActionsGoJsonInputEnvName = "ACTION_GO_INPUTS" )
const EOF = "\n"
Variables ¶
This section is empty.
Functions ¶
func AddPath ¶
func AddPath(path string)
AddPath prepends inputPath to the PATH (for this action and future actions)
func AddStepSummary ¶
func AddStepSummary(summary string)
AddStepSummary adds some custom Markdown for each job so that it will be displayed on the summary page of a workflow run. You can use job summaries to display and group unique content, such as test result summaries, so that someone viewing the result of a workflow run doesn't need to go into the logs to see important information related to the run, such as failures. see: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf writes debug message to user log
func DeleteStepSummary ¶
func DeleteStepSummary()
DeleteStepSummary completely remove a summary for the current step see: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#removing-job-summaries
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf writes debug message to user log
func ExportVariable ¶
func ExportVariable(name, value string)
ExportVariable sets the environment varaible name (for this action and future actions)
func GetBoolInput ¶
GetBoolInput gets the value of an input and returns whether it equals "true". In any other case, whether it does not equal, or the input is not set, false is returned
func GetInputOrDefault ¶
GetInputOrDefault gets the value of an input. If value is not found, a default value is used
func Group ¶
func Group(name string, f func()) func()
Group wrap an asynchronous function call in a group, all logs of the function will be collapsed after completion
func IsDebug ¶
func IsDebug() bool
IsDebug returns whether the github actions is currently under debug
func IssueCommand ¶
IssueCommand displays a typed message with properties following github actions interface. see https://github.com/actions/toolkit/blob/e69833ed16500afaa7d137a9cf6da76fb8fb54da/packages/core/src/command.ts#L19
func ReplaceStepSummary ¶
func ReplaceStepSummary(summary string)
ReplaceStepSummary clear all content for the current step see: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#overwriting-job-summaries
func SaveState ¶
func SaveState(name, value string)
SaveState saves state for current action, the state can only be retrieved by this action's post job execution.
func SetFailed ¶
func SetFailed(message string)
SetFailed sets the action status to failed and sets an error message
func SetFailedf ¶
func SetFailedf(format string, args ...interface{})
SetFailedf sets the action status to failed and sets an error message
func SetOutput ¶
func SetOutput(name, value string)
SetOutput sets the value of an output for future actions
func SetSecret ¶
func SetSecret(secret string)
SetSecret registers a secret which will get masked from logs
func StartCommands ¶
func StartCommands(endToken string)
StartCommands enables commands stopped until the endToken
func StartGroup ¶
func StartGroup(name string)
StartGroup begin an output group. Output until the next `GroupEnd` will be foldable in this group
func StopCommands ¶
func StopCommands(endToken string)
StopCommands Stops processing any workflow commands. Commands will be resumed when calling StartCommands(endToken) This special command allows you to log anything without accidentally running a workflow command. For example, you could stop logging to output an entire script that has comments.
func Warningf ¶
func Warningf(format string, args ...interface{})
Warningf writes debug message to user log
func WithoutCommands ¶
func WithoutCommands(endToken string, f func())
WithoutCommands executes the functions ensuring it does not execute any github actions commands. This special command allows you to log anything without accidentally running a workflow command. For example, you could stop logging to output an entire script that has comments.