Skip to content

Commit

Permalink
ci: Add workflow to cancel redundant workflows
Browse files Browse the repository at this point in the history
This is not yet baked into GitHub but can be achived using a public
action.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
  • Loading branch information
Andrei Gherzan committed Feb 18, 2022
1 parent 55e1328 commit 3fd0d3a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/cancel-redundant-workflows.yml
@@ -0,0 +1,23 @@
# SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com>
#
# SPDX-License-Identifier: MIT

name: Cancel redundant workflows

on:
workflow_run:
workflows:
- "Builds"
- "Compliance"
- "Yocto Compatible"
types:
- requested

jobs:
cancel-redundant-workflows:
runs-on: [self-hosted, Linux]
steps:
- uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true
workflow_id: ${{ github.event.workflow.id }}

0 comments on commit 3fd0d3a

Please sign in to comment.