mirror of https://github.com/actions/toolkit
Merge branch 'features/core' of https://github.com/actions/toolkit into features/core
commit
aa10eecbb0
|
@ -42,7 +42,7 @@ export function getInput(name: string, options?: InputOptions): string | undefin
|
|||
* sets the status of the action to neutral
|
||||
* @param message
|
||||
*/
|
||||
export function setFailed(message: string): void
|
||||
export function setNeutral(message: string): void
|
||||
|
||||
/**
|
||||
* sets the status of the action to failed
|
||||
|
|
|
@ -5,60 +5,46 @@
|
|||
## Usage
|
||||
|
||||
```
|
||||
//-----------------------------------------------------------------------
|
||||
// Variables, Inputs and Outputs
|
||||
//-----------------------------------------------------------------------
|
||||
// Logging functions
|
||||
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
|
||||
*
|
||||
* @param name the name of the variable to set
|
||||
* @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
|
||||
* @param val value of the secret
|
||||
* Interface for getInput options
|
||||
*/
|
||||
export function setSecret(name: string, val: string);
|
||||
|
||||
// TODO: follow up and see if we need anything for outputs
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// Results
|
||||
//-----------------------------------------------------------------------
|
||||
export interface InputOptions {
|
||||
/** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */
|
||||
required?: bool;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* When the action exits it will be with an exit code of 1
|
||||
* @param message add error issue message
|
||||
* sets the status of the action to neutral
|
||||
* @param message
|
||||
*/
|
||||
export function setFailed(message: string);
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// Logging Commands
|
||||
//-----------------------------------------------------------------------
|
||||
export function setNeutral(message: string): void
|
||||
|
||||
/**
|
||||
* Writes debug message to user log
|
||||
* @param message debug message
|
||||
* sets the status of the action to failed
|
||||
* @param 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);
|
||||
export function setFailed(message: string): void
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue