class Core

Methods

bool
isDebug()

Gets whether Actions Step Debug is on or not.

void
debug(string $message)

Writes debug message to user log.

void
warning(string $message)

Adds an warning issue.

void
error(string $message)

Adds an error issue.

void
exportVariable(string $name, string $value)

Sets env variable for this action and future actions in the job.

void
setSecret(string $secret)

Registers a secret which will get masked from logs.

void
addPath(string $inputPath)

Prepends inputPath to the PATH (for this action and future actions).

string
getInput(string $name, bool $required = false)

Gets the value of an input. The value is also trimmed.

void
setOutput(string $name, string $value)

Sets the value of an output.

void
setFailed(string $message)

Sets the action status to failed.

void
saveState(string $name, string $value)

Saves state for current action, the state can only be retrieved by this action's post job execution.

string
getState(string $name)

Gets the value of an state set by this action's main execution.

Details

at line 12
bool isDebug()

Gets whether Actions Step Debug is on or not.

Return Value

bool

at line 22
void debug(string $message)

Writes debug message to user log.

Parameters

string $message debug message

Return Value

void

at line 32
void warning(string $message)

Adds an warning issue.

Parameters

string $message warning issue message

Return Value

void

at line 42
void error(string $message)

Adds an error issue.

Parameters

string $message error issue message

Return Value

void

at line 53
void exportVariable(string $name, string $value)

Sets env variable for this action and future actions in the job.

Parameters

string $name the name of the variable to set
string $value the value of the variable

Return Value

void

at line 63
void setSecret(string $secret)

Registers a secret which will get masked from logs.

Parameters

string $secret value of the secret

Return Value

void

at line 71
void addPath(string $inputPath)

Prepends inputPath to the PATH (for this action and future actions).

Parameters

string $inputPath

Return Value

void

at line 82
string getInput(string $name, bool $required = false)

Gets the value of an input. The value is also trimmed.

Parameters

string $name
bool $required

Return Value

string

at line 99
void setOutput(string $name, string $value)

Sets the value of an output.

Parameters

string $name name of the output to set
string $value value to store

Return Value

void

at line 110
void setFailed(string $message)

Sets the action status to failed.

When the action exits it will be with an exit code of 1.

Parameters

string $message add error issue message

Return Value

void

at line 121
void saveState(string $name, string $value)

Saves state for current action, the state can only be retrieved by this action's post job execution.

Parameters

string $name name of the state to store
string $value value to store

Return Value

void

at line 131
string getState(string $name)

Gets the value of an state set by this action's main execution.

Parameters

string $name name of the state to get

Return Value

string