mirror of https://github.com/actions/toolkit
update specs
parent
a97380e90d
commit
792122be54
|
@ -42,7 +42,7 @@ export function getInput(name: string, options?: InputOptions): string | undefin
|
||||||
* sets the status of the action to neutral
|
* sets the status of the action to neutral
|
||||||
* @param message
|
* @param message
|
||||||
*/
|
*/
|
||||||
export function setFailed(message: string): void
|
export function setNeutral(message: string): void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets the status of the action to failed
|
* sets the status of the action to failed
|
||||||
|
|
|
@ -5,60 +5,46 @@
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```
|
```
|
||||||
//-----------------------------------------------------------------------
|
// Logging functions
|
||||||
// Variables, Inputs and Outputs
|
export function debug(message: string): void
|
||||||
//-----------------------------------------------------------------------
|
export function warning(message: string): void
|
||||||
|
export function error(message: string): void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets env variable for this action and future actions in the job
|
* sets env variable for this action and future actions in the job
|
||||||
|
*
|
||||||
* @param name the name of the variable to set
|
* @param name the name of the variable to set
|
||||||
* @param val the value of the variable
|
* @param val the value of the variable
|
||||||
|
* @param options optional. See ExportOptions.
|
||||||
*/
|
*/
|
||||||
export function exportVariable(name: string, val: string);
|
export function exportVariable(name: string, val: string): void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* registers a secret which will get masked from logs
|
* Interface for getInput options
|
||||||
* @param val value of the secret
|
|
||||||
*/
|
*/
|
||||||
export function setSecret(name: string, val: string);
|
export interface InputOptions {
|
||||||
|
/** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */
|
||||||
// TODO: follow up and see if we need anything for outputs
|
required?: bool;
|
||||||
|
}
|
||||||
//-----------------------------------------------------------------------
|
|
||||||
// Results
|
|
||||||
//-----------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the action status to neutral
|
* Gets the value of an input. The value is also trimmed.
|
||||||
|
*
|
||||||
|
* @param name name of the input to get
|
||||||
|
* @param options optional. See InputOptions.
|
||||||
|
* @returns string
|
||||||
*/
|
*/
|
||||||
export function setNeutral();
|
export function getInput(name: string, options?: InputOptions): string | undefined
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the action status to failed.
|
* sets the status of the action to neutral
|
||||||
* When the action exits it will be with an exit code of 1
|
* @param message
|
||||||
* @param message add error issue message
|
|
||||||
*/
|
*/
|
||||||
export function setFailed(message: string);
|
export function setNeutral(message: string): void
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
|
||||||
// Logging Commands
|
|
||||||
//-----------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes debug message to user log
|
* sets the status of the action to failed
|
||||||
* @param message debug message
|
* @param message
|
||||||
*/
|
*/
|
||||||
export function debug(message: string);
|
export function setFailed(message: string): void
|
||||||
|
|
||||||
/**
|
|
||||||
* 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);
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue