From 7a1c5e80f5520281acf1fcc7776bd795585ea025 Mon Sep 17 00:00:00 2001 From: yi_Xu Date: Wed, 24 Feb 2021 13:02:21 +0800 Subject: [PATCH] docs(core): ppdate core package readme Add description of getBooleanInput function. --- packages/core/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/README.md b/packages/core/README.md index 45db072d83..7ab91a0586 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -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'); ```