ci: minor optimization in the cancel workflow (#10978)
before this we scheduled two additional workflows, one for each workflow. This PR now schedules just one, which cancels both workflows by itself.pull/10981/head
parent
8eb544146e
commit
61ed1d810f
|
@ -2,7 +2,7 @@ name: Cancel previous workflows
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: ["Code CI", "Sanitized CI"] # the other workflows finish quickly - no need to skip them for now
|
workflows: ["Code CI"]
|
||||||
types:
|
types:
|
||||||
- requested
|
- requested
|
||||||
|
|
||||||
|
@ -14,4 +14,5 @@ jobs:
|
||||||
# don't cancel CI for commits pushed to vlang/v#master (if ci is still too slow, this can be removed safely)
|
# don't cancel CI for commits pushed to vlang/v#master (if ci is still too slow, this can be removed safely)
|
||||||
if: ${{ github.event.workflow_run.head_repository.full_name != 'vlang/v' || github.event.workflow_run.head_branch != 'master' }}
|
if: ${{ github.event.workflow_run.head_repository.full_name != 'vlang/v' || github.event.workflow_run.head_branch != 'master' }}
|
||||||
with:
|
with:
|
||||||
workflow_id: ${{ github.event.workflow.id }}
|
# workflow ids for `Code CI` and `Sanitized CI` (from https://api.github.com/repos/vlang/v/actions/workflows):
|
||||||
|
workflow_id: 4577,7940868 # the other workflows finish quickly - no need to skip them
|
||||||
|
|
Loading…
Reference in New Issue