add scalar handling
This commit is contained in:
@@ -51,7 +51,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) {
|
||||
@@ -81,6 +81,8 @@ function convertStep(context: TemplateContext, idBuilder: IdBuilder, step: Templ
|
||||
case "continue-on-error":
|
||||
if (!item.value.isExpression) {
|
||||
continueOnError = item.value.assertBoolean("steps item continue-on-error").value;
|
||||
} else {
|
||||
continueOnError = item.value.assertScalar("steps item continue-on-error");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ type BaseStep = {
|
||||
id: string;
|
||||
name?: ScalarToken;
|
||||
if: BasicExpressionToken;
|
||||
"continue-on-error"?: boolean;
|
||||
"continue-on-error"?: boolean | ScalarToken;
|
||||
env?: MappingToken;
|
||||
};
|
||||
|
||||
@@ -154,12 +154,12 @@ export type PathFilterConfig = {
|
||||
};
|
||||
|
||||
export type WorkflowDispatchConfig = {
|
||||
inputs?: {[inputName: string]: InputConfig};
|
||||
inputs?: { [inputName: string]: InputConfig };
|
||||
};
|
||||
|
||||
export type WorkflowCallConfig = {
|
||||
inputs?: {[inputName: string]: InputConfig & {default?: string | boolean | number | ScalarToken}};
|
||||
secrets?: {[secretName: string]: SecretConfig};
|
||||
inputs?: { [inputName: string]: InputConfig & { default?: string | boolean | number | ScalarToken } };
|
||||
secrets?: { [secretName: string]: SecretConfig };
|
||||
// TODO - these are supported in C# and Go but not in TS yet
|
||||
// outputs: { [outputName: string]: OutputConfig }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user