Skip to content

Commit

Permalink
docs(core): update core package readme
Browse files Browse the repository at this point in the history
Add description of getBooleanInput function.
  • Loading branch information
yi-Xu-0100 committed Feb 24, 2021
1 parent 88d67dd commit 4eb1303
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import * as core from '@actions/core';

#### Inputs/Outputs

Action inputs can be read with `getInput`. Outputs can be set with `setOutput` which makes them available to be mapped into inputs of other actions to ensure they are decoupled.
Action inputs can be read with `getInput` while the return type is `string`, and the inputs of the boolean type in the [YAML specification](https://yaml.org/type/bool.html) can be read with `getBooleanInput` while the return type is `boolean`. Outputs can be set with `setOutput` which makes them available to be mapped into inputs of other actions to ensure they are decoupled.

```js
const myInput = core.getInput('inputName', { required: true });

const myInput = core.getInput('inputName', { required: true })
const myBooleanInput = core.getBooleanInput('booleanInputName');
core.setOutput('outputKey', 'outputVal');
```

Expand Down

0 comments on commit 4eb1303

Please sign in to comment.