49ff9e1768
- Microsoft.DotNet.Arcade.Sdk: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
33 lines
No EOL
959 B
YAML
33 lines
No EOL
959 B
YAML
parameters:
|
|
# if parameter1 equals parameter 2, run 'ifScript' command, else run 'elsescript' command
|
|
parameter1: ''
|
|
parameter2: ''
|
|
ifScript: ''
|
|
elseScript: ''
|
|
|
|
# name of script step
|
|
name: Script
|
|
|
|
# display name of script step
|
|
displayName: If-Equal-Else Script
|
|
|
|
# environment
|
|
env: {}
|
|
|
|
# conditional expression for step execution
|
|
condition: ''
|
|
|
|
steps:
|
|
- ${{ if and(ne(parameters.ifScript, ''), eq(parameters.parameter1, parameters.parameter2)) }}:
|
|
- script: ${{ parameters.ifScript }}
|
|
name: ${{ parameters.name }}
|
|
displayName: ${{ parameters.displayName }}
|
|
env: ${{ parameters.env }}
|
|
condition: ${{ parameters.condition }}
|
|
|
|
- ${{ if and(ne(parameters.elseScript, ''), ne(parameters.parameter1, parameters.parameter2)) }}:
|
|
- script: ${{ parameters.elseScript }}
|
|
name: ${{ parameters.name }}
|
|
displayName: ${{ parameters.displayName }}
|
|
env: ${{ parameters.env }}
|
|
condition: ${{ parameters.condition }} |