From 61755ada9b59b84cd83699e37c4d81950d60afae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= Date: Sat, 2 Aug 2025 19:27:15 +0100 Subject: [PATCH] CI: cancel previous workflow runs when new commit is pushed --- .github/workflows/ci.yaml | 6 ++++++ .github/workflows/lint.yml | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cedc5f6b8..80826f468 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,6 +4,12 @@ on: push: branches: - master + +concurrency: + # Cancel previous workflow run when a new commit is pushed to a feature branch + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + env: PY_COLORS: 1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d5154a9cb..dce45a2dd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,6 +6,11 @@ on: branches: - master +concurrency: + # Cancel previous workflow run when a new commit is pushed to a feature branch + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + env: PYTHON_VERSION: 3.9