From b7b34ecce7541e51eacd30a30828793a93926d70 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Sat, 12 Feb 2022 02:44:41 +0100 Subject: [PATCH] ci: Add workflow to cancel redundant workflows This is not yet baked into GitHub but can be achived using a public action. Signed-off-by: Andrei Gherzan --- .../workflows/cancel-redundant-workflows.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/cancel-redundant-workflows.yml diff --git a/.github/workflows/cancel-redundant-workflows.yml b/.github/workflows/cancel-redundant-workflows.yml new file mode 100644 index 0000000..45a7443 --- /dev/null +++ b/.github/workflows/cancel-redundant-workflows.yml @@ -0,0 +1,23 @@ +# SPDX-FileCopyrightText: Andrei Gherzan +# +# 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 }}