Skip to content

Commit

Permalink
Update manage-integration-check.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
frazarshad authored Jul 26, 2024
1 parent ddd7e17 commit 089d0a4
Showing 1 changed file with 29 additions and 13 deletions.
42 changes: 29 additions & 13 deletions .github/workflows/manage-integration-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ jobs:
summary: `Synthetic check capturing the result of the <a href="${context.payload.workflow_run.html_url}">integration-test workflow run</a>`,
}
});
const check2 = await github.rest.checks.create({
...context.repo,
head_sha,
name: "integration-test-result",
status: "in_progress",
external_id,
output: {
title: "Integration Test Aggregate Result",
summary: `Synthetic check capturing the result of the <a href="${context.payload.workflow_run.html_url}">integration-test workflow run</a>`,
}
});
console.log(JSON.stringify(check, null, 2));
console.log(JSON.stringify(check2, null, 2));
return check.data.id;
Expand Down Expand Up @@ -85,8 +74,35 @@ jobs:
const run = descRuns[0];
if (true) {
core.setFailed(`No integration-test-result check found for commit ${head_sha} ${external_id}`);
return;
const checkx = await github.rest.checks.create({
...context.repo,
head_sha,
name: "integration-test-result",
external_id,
output: {
title: "Integration Test Aggregate Result",
summary: `Synthetic check capturing the result of the <a href="${context.payload.workflow_run.html_url}">integration-test workflow run</a>`,
}
status: "completed",
conclusion: context.payload.workflow_run.conclusion,
});
console.log(JSON.stringify(checkx, null, 2));
const checky = await github.rest.checks.create({
...context.repo,
head_sha,
name: "integration-test-result",
status: "in_progress",
external_id,
output: {
title: "Integration Test Aggregate Result",
summary: `Synthetic check capturing the result of the <a href="${context.payload.workflow_run.html_url}">integration-test workflow run</a>`,
}
});
console.log(JSON.stringify(checky, null, 2));
return;
}
console.log('Latest integration-test-result check run:', run.html_url)
Expand Down

0 comments on commit 089d0a4

Please sign in to comment.