mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Fail the action if triggering workflow run has been cancelled
This commit is contained in:
parent
577cc333e8
commit
4e1eb73eb5
4 changed files with 10 additions and 3 deletions
|
|
@ -15,6 +15,9 @@ export function getCheckRunContext(): {sha: string; runId: number} {
|
|||
if (!event.workflow_run) {
|
||||
throw new Error("Event of type 'workflow_run' is missing 'workflow_run' field")
|
||||
}
|
||||
if (event.workflow_run.conclusion === 'cancelled') {
|
||||
throw new Error(`Workflow run ${event.workflow_run.id} has been cancelled`)
|
||||
}
|
||||
return {
|
||||
sha: event.workflow_run.head_commit.id,
|
||||
runId: event.workflow_run.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue