File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,19 +48,19 @@ jobs:
4848 per_page: 20
4949 });
5050
51- const latestSuccessfulRun = runs.data.workflow_runs.find(
52- (run) => run.conclusion === "success"
53- );
51+ const latestRun = runs.data.workflow_runs[0];
5452
55- if (!latestSuccessfulRun ) {
56- core.setFailed("Could not find a successful build.yml workflow run on main.");
53+ if (!latestRun ) {
54+ core.setFailed("Could not find any build.yml workflow run on main.");
5755 return;
5856 }
5957
60- core.setOutput("run_id", String(latestSuccessfulRun.id));
61- core.setOutput("head_sha", latestSuccessfulRun.head_sha);
62- console.log("Latest successful build run: " + latestSuccessfulRun.id);
63- console.log("Spec commit: " + latestSuccessfulRun.head_sha);
58+ core.setOutput("run_id", String(latestRun.id));
59+ core.setOutput("head_sha", latestRun.head_sha);
60+ core.setOutput("conclusion", latestRun.conclusion || "unknown");
61+ console.log("Latest build run: " + latestRun.id);
62+ console.log("Spec commit: " + latestRun.head_sha);
63+ console.log("Build conclusion: " + (latestRun.conclusion || "unknown"));
6464
6565 - name : Download Latest Spec Build Artifact
6666 id : download_build_artifact
You can’t perform that action at this time.
0 commit comments