-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Thank you 🙇♀ for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.
- If you have found a security issue please submit it here
- If you have questions about writing workflows or action files, then please visit the GitHub Community Forum's Actions Board
- If you are having an issue or question about GitHub Actions then please contact customer support
If your issue is relevant to this repository, please include the information below:
Describe the enhancement
get the correct boolean input of workflows.
Code Snippet
export function getBooleanInput(booleanInputName: string, options?: core.InputOptions) {
const trueValue = ['true', 'True', 'TRUE', 'yes', 'Yes', 'YES', 'y', 'Y', 'on', 'On', 'ON'];
const falseValue = ['false', 'False', 'FALSE', 'no', 'No', 'NO', 'n', 'N', 'off', 'Off', 'OFF'];
var stringInput = core.getInput(booleanInputName, options);
if (trueValue.indexOf(stringInput) > -1) return true;
if (falseValue.indexOf(stringInput) > -1) return false;
throw TypeError(`Wrong boolean input value of ${booleanInputName}`);
}
const booleanInput = getBooleanInput('booleanInput')Additional information
jbristowe
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request