diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef64c42..6996279 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ Please avoid: * Opening pull requests for issues marked `needs-design`, `needs-investigation`, or `blocked`. -Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md). +Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE). Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms. @@ -60,4 +60,10 @@ Please also look at the `README.md` files for each package for additional notes - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) - [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) -- [GitHub Help](https://help.github.com) \ No newline at end of file +- [GitHub Help](https://help.github.com) + + +[bug issues]: https://github.com/actions/languageservices/labels/bug +[feature request issues]: https://github.com/actions/languageservices/labels/enhancement +[hw]: https://github.com/actions/languageservices/labels/help%20wanted +[gfi]: https://github.com/actions/languageservices/labels/good%20first%20issue diff --git a/workflow-parser/src/model/converter/steps.ts b/workflow-parser/src/model/converter/steps.ts index aa11f5d..05793a5 100644 --- a/workflow-parser/src/model/converter/steps.ts +++ b/workflow-parser/src/model/converter/steps.ts @@ -50,7 +50,7 @@ function convertStep(context: TemplateContext, idBuilder: IdBuilder, step: Templ let id: StringToken | undefined; let name: ScalarToken | undefined; let uses: StringToken | undefined; - let continueOnError: boolean | undefined; + let continueOnError: boolean | ScalarToken | undefined; let env: MappingToken | undefined; const ifCondition = new BasicExpressionToken(undefined, undefined, "success()", undefined, undefined, undefined); for (const item of mapping) { @@ -78,7 +78,11 @@ function convertStep(context: TemplateContext, idBuilder: IdBuilder, step: Templ env = item.value.assertMapping("step env"); break; case "continue-on-error": - continueOnError = item.value.assertBoolean("steps item continue-on-error").value; + if (!item.value.isExpression) { + continueOnError = item.value.assertBoolean("steps item continue-on-error").value; + } else { + continueOnError = item.value.assertScalar("steps item continue-on-error"); + } } } diff --git a/workflow-parser/src/model/workflow-template.ts b/workflow-parser/src/model/workflow-template.ts index d50fea9..679da4f 100644 --- a/workflow-parser/src/model/workflow-template.ts +++ b/workflow-parser/src/model/workflow-template.ts @@ -86,7 +86,7 @@ type BaseStep = { id: string; name?: ScalarToken; if: BasicExpressionToken; - "continue-on-error"?: boolean; + "continue-on-error"?: boolean | ScalarToken; env?: MappingToken; };