From 28924fc791e41b6ee39592711e6a66a96f5c2b77 Mon Sep 17 00:00:00 2001 From: NanoCode012 Date: Wed, 13 Nov 2024 22:06:59 +0700 Subject: [PATCH] feat: cancel ongoing tests if new CI is triggered (#2046) [skip ci] --- .github/workflows/tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a9ae718ff..dfdab7382 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,6 +15,11 @@ on: - '.github/workflows/*.yml' workflow_dispatch: +# Cancel jobs on the same ref if a new one is triggered +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: pre-commit: name: pre-commit