mirror of https://github.com/actions/toolkit
Add links to code in package READMEs
Intsead of having to update the READMEs for each package whenever TypeScript signatures change, link directly to the TypeScript code. Later, we can run a Typedoc server, perhaps.pull/4/head
parent
978b6e02dd
commit
c999afbce1
|
@ -4,57 +4,4 @@
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```
|
See [src/core.tsx](src/core.tsx).
|
||||||
// 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): void
|
|
||||||
|
|
||||||
/**
|
|
||||||
* exports the variable and registers a secret which will get masked from logs
|
|
||||||
* @param name the name of the variable to set
|
|
||||||
* @param val value of the secret
|
|
||||||
*/
|
|
||||||
export function exportSecret(name: string, val: string) {
|
|
||||||
exportVariable(name, val);
|
|
||||||
intm._issueCommand('set-secret', {}, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Interface for getInput options
|
|
||||||
*/
|
|
||||||
export interface InputOptions {
|
|
||||||
/** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */
|
|
||||||
required?: bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 getInput(name: string, options?: InputOptions): string | undefined
|
|
||||||
|
|
||||||
/**
|
|
||||||
* sets the status of the action to neutral
|
|
||||||
* @param message
|
|
||||||
*/
|
|
||||||
export function setNeutral(message: string): void
|
|
||||||
|
|
||||||
/**
|
|
||||||
* sets the status of the action to failed
|
|
||||||
* @param message
|
|
||||||
*/
|
|
||||||
export function setFailed(message: string): void
|
|
||||||
```
|
|
||||||
|
|
|
@ -4,8 +4,4 @@
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```
|
See [src/exit.ts](src/exit.ts).
|
||||||
const exit = require('@actions/exit');
|
|
||||||
|
|
||||||
// TODO: DEMONSTRATE API
|
|
||||||
```
|
|
|
@ -4,8 +4,4 @@
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```
|
See [src/toolkit.ts](src/toolkit.ts).
|
||||||
const github = require('@actions/toolkit');
|
|
||||||
|
|
||||||
// TODO: DEMONSTRATE API
|
|
||||||
```
|
|
Loading…
Reference in New Issue