-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[steps] Add better workflow support for if condition #497
[steps] Add better workflow support for if condition #497
Conversation
@@ -308,17 +308,14 @@ export class BuildStep extends BuildStepOutputAccessor { | |||
|
|||
let ifCondition = this.ifCondition; | |||
|
|||
if (ifCondition.startsWith('${') && ifCondition.endsWith('}')) { | |||
if (ifCondition.startsWith('${{') && ifCondition.endsWith('}}')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we allow for ${{ sth }}
pattern in other places like inside of run
? If we don't it's strange to support it only for if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do!
@@ -331,6 +328,7 @@ export class BuildStep extends BuildStepOutputAccessor { | |||
runtimePlatform: this.ctx.global.runtimePlatform, | |||
...this.ctx.global.staticContext, | |||
}, | |||
...this.getInterpolationContext(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this includes deleted things, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea
Why
We want to support
if
conditions on individual steps in workflows.How
ifCondition
ifCondition
StepZ
Zod schema so we can replacewww
copies with using upstreamTest Plan
Added some tests.