2019-05-16 20:40:21 +00:00
|
|
|
# `@actions/core`
|
|
|
|
|
2019-05-17 03:36:45 +00:00
|
|
|
> Core functions for setting results, logging, registering secrets and exporting variables across actions
|
2019-05-16 20:40:21 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```
|
2019-05-17 03:36:45 +00:00
|
|
|
/**
|
|
|
|
* sets env variable for this action and future actions in the job
|
|
|
|
* @param name the name of the variable to set
|
|
|
|
* @param val the value of the variable
|
|
|
|
*/
|
|
|
|
export function exportVariable(name: string, val: string, options?:im.ExportOptions);
|
2019-05-16 20:40:21 +00:00
|
|
|
|
2019-05-17 03:36:45 +00:00
|
|
|
/**
|
|
|
|
* registers a secret which will get masked from logs
|
|
|
|
* @param val value of the secret
|
|
|
|
*/
|
|
|
|
export function setSecret(val: string);
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------
|
|
|
|
// Results
|
|
|
|
//-----------------------------------------------------------------------
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the action status to neutral
|
|
|
|
*/
|
|
|
|
export function setNeutral();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the action status to failed.
|
|
|
|
* When the action exits it will be with an exit code of 1
|
|
|
|
* @param message add error issue message
|
|
|
|
*/
|
|
|
|
export function setFailed(message: string);
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------
|
|
|
|
// Logging Commands
|
|
|
|
//-----------------------------------------------------------------------
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Writes debug message to user log
|
|
|
|
* @param message debug message
|
|
|
|
*/
|
|
|
|
export function debug(message: string);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds an error issue
|
|
|
|
* @param message error issue message
|
|
|
|
*/
|
|
|
|
export function error(message: string);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds an warning issue
|
|
|
|
* @param message warning issue message
|
|
|
|
*/
|
|
|
|
export function warning(message: string);
|
2019-05-16 20:40:21 +00:00
|
|
|
```
|