Skip to content

Commit 3ff50cb

Browse files
authored
Merge pull request #17 from azure-ai-foundry/python-tools-estraight
fix: add matrix output to resolve-setups job
2 parents f5c6b65 + f433cee commit 3ff50cb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/run-samples.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)