You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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
exportfunctiongetBooleanInput(booleanInputName: string,options?: core.InputOptions){consttrueValue=['true','True','TRUE','yes','Yes','YES','y','Y','on','On','ON'];constfalseValue=['false','False','FALSE','no','No','NO','n','N','off','Off','OFF'];varstringInput=core.getInput(booleanInputName,options);if(trueValue.indexOf(stringInput)>-1)returntrue;if(falseValue.indexOf(stringInput)>-1)returnfalse;throwTypeError(`Wrong boolean input value of ${booleanInputName}`);}constbooleanInput=getBooleanInput('booleanInput')
/** * Gets the input value of the boolean type in the YAML specification. * The return value is also in boolean type. * ref: https://yaml.org/type/bool.html * * @param name name of the input to get * @returns boolean */exportfunctiongetBooleanInput(name: string): boolean{consttrueValue=['true','True','TRUE','yes','Yes','YES','y','Y','on','On','ON']constfalseValue=['false','False','FALSE','no','No','NO','n','N','off','Off','OFF']constval: string=(process.env[`INPUT_${name.replace(//g,'_').toUpperCase()}`]||'').trim()if(trueValue.includes(val))returntrueif(falseValue.includes(val))returnfalsethrownewTypeError(`Input does not meet YAML specifications: ${name}`)}
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 your issue is relevant to this repository, please include the information below:
Describe the enhancement
get the correct boolean input of workflows.
Code Snippet
Additional information
https://yaml.org/type/bool.html
The text was updated successfully, but these errors were encountered: