File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -317,13 +317,17 @@ extension on CIJobEntry {
317317 posix.join (package, workingDirectory),
318318 );
319319 }
320+ var condition = task.action? .condition;
321+ if (condition != null ) {
322+ condition += " && steps.$pubStepId .conclusion == 'success'" ;
323+ }
320324 commandEntries.add (
321325 _CommandEntry (
322326 '$package ; ${task .command }' ,
323327 _commandForOs (task.command),
324328 type: task.type,
325329 id: task.action? .id,
326- ifCondition: task.action ? . condition ??
330+ ifCondition: condition ??
327331 // Run this regardless of the success of other steps other than
328332 // the pub step.
329333 "always() && steps.$pubStepId .conclusion == 'success'" ,
Original file line number Diff line number Diff line change @@ -1251,7 +1251,7 @@ stages:
12511251 my-key: my-var
12521252 my-num: 123
12531253 my-map: {'abc':123}
1254- if: always()
1254+ if: \$ {{ github.event_name == 'pull_request' }}
12551255 working-directory: ./tool
12561256 shell: fish
12571257''' )
@@ -1270,7 +1270,7 @@ stages:
12701270 my-key: my-var
12711271 my-num: "123"
12721272 my-map: "{\\ "abc\\ ":123}"
1273- if: always()
1273+ if: " \$ {{ github.event_name == 'pull_request' }} && steps.pkg_a_pub_upgrade.conclusion == 'success'"
12741274 working-directory: pkg_a/tool
12751275 run: "./script_a && ./script_b && ./script_c"
12761276 shell: fish
@@ -1305,7 +1305,8 @@ stages:
13051305 defaultGitHubWorkflowFilePath,
13061306 stringContainsInOrder ([
13071307 'id: custom-script' ,
1308- 'if: always()' ,
1308+ 'if: "always() && '
1309+ r"steps.pkg_a_pub_upgrade.conclusion == 'success'" ,
13091310 'working-directory: pkg_a/tool' ,
13101311 ]),
13111312 )
You can’t perform that action at this time.
0 commit comments