From 5b9b89769ac718df9cd4cf2f45411be522ea7671 Mon Sep 17 00:00:00 2001 From: "Steven B." <51370195+sdb9696@users.noreply.github.com> Date: Fri, 24 Jan 2025 18:45:14 +0000 Subject: [PATCH] Cancel in progress CI workflows after new pushes (#1481) Create a concurreny group which will cancel in progress workflows after new pushes to pull requests or python-kasa branches. --- .github/workflows/ci.yml | 4 ++++ .github/workflows/codeql-analysis.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c3643b1..abe01651 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,10 @@ on: - 'janitor/**' workflow_dispatch: # to allow manual re-runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: UV_VERSION: 0.4.16 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9edba483..016ff0c3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -15,6 +15,10 @@ on: schedule: - cron: '44 17 * * 3' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: analyze: name: Analyze