File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -112,16 +112,20 @@ jobs:
112112 if (!requested.length) {
113113 // If no setups are found (e.g., invalid comment), fail the workflow early.
114114 core.setFailed('No setups selected – stopping workflow.');
115+ // Note: Script execution CONTINUES after setFailed, so we set the output below.
115116 }
116117
117118 // Construct the matrix object in the format required by the downstream job's strategy.
119+ // If 'requested' is empty due to the failure check above, this will be { include: [] }.
118120 const matrix = {
119121 // The 'include' key pairs with the 'setup' variable name used in the e2e job.
120122 include: requested.map((s) => ({ setup: s }))
121123 };
122124
123- // Convert the JavaScript matrix object into a JSON string to be used as the step's output.
124- return JSON.stringify(matrix);
125+ // Explicitly set the output, even if the job is marked to fail.
126+ // The downstream job's 'if' condition will prevent it from running if this job fails.
127+ core.setOutput('matrix', JSON.stringify(matrix));
128+ // No final 'return' statement needed when using core.setOutput
125129
126130# ────────────────────────────────────────────────────────────────
127131# 2️⃣ MAIN TEST JOB – one copy per setup
You can’t perform that action at this time.
0 commit comments