Skip to content

Commit

Permalink
Fix reporting of cancelled jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed May 23, 2024
1 parent 142d857 commit 14f1cbc
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/touchstone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,24 @@ jobs:

with:
script: |
let description = process.env.RESULT == "success" ? 'Benchmarking succeeded!'
: 'Benchmarking failed!';
let description;
switch (process.env.RESULT) {
case "success":
description = 'Benchmarking succeeded!';
break;
case "cancelled":
description = 'Benchmarking was cancelled.';
break;
default:
description = 'Benchmarking failed!';
break;
}
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: process.env.HEAD_SHA,
state: process.env.RESULT,
state: process.env.RESULT == "success" ? "success" : "failure",
target_url: process.env.WORKFLOW_URL,
description: description,
context: 'touchstone'
Expand Down

0 comments on commit 14f1cbc

Please sign in to comment.