From 4bba23800ef01143266fe20032e94af660b5e214 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Mon, 28 Nov 2022 03:16:16 +0100 Subject: [PATCH] CI: Improve efficiency on GHA When pushing to the same branch on a PR, cancel running jobs of the same kind. --- .github/workflows/tests.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a22554bc..0e3641ff 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -5,8 +5,15 @@ on: branches: [ main ] pull_request: branches: [ main ] + + # Allow job to be triggered manually. workflow_dispatch: +# Cancel in-progress jobs when pushing to the same branch. +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} + jobs: tests-backend: