From f70a315db6794a83a2f0aabb2ff759ae94964516 Mon Sep 17 00:00:00 2001 From: Konstantinos Date: Sun, 29 Jun 2025 20:55:07 +0200 Subject: [PATCH 1/4] Cancel running workflows if a newer commit is pushed on the same branch --- .github/workflows/codeql-analysis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 185ebe139c6..1a5cbf7c4c3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -15,6 +15,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + jobs: analyze: name: Analyze From d832f996cddcb6899cac0367ac2a2d7aafba05c4 Mon Sep 17 00:00:00 2001 From: Konstantinos Date: Mon, 30 Jun 2025 13:04:59 +0200 Subject: [PATCH 2/4] Cancel obsolete workflows only in PRs --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1a5cbf7c4c3..4605153d6ca 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -16,8 +16,8 @@ permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} - cancel-in-progress: true + group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} # this will cancel only PRs jobs: analyze: From 935558bc0255eeb6587592293dda681db88a4c83 Mon Sep 17 00:00:00 2001 From: Konstantinos Date: Mon, 14 Jul 2025 21:35:52 +0200 Subject: [PATCH 3/4] commenting out changes to see what happens to build failure Signed-off-by: Konstantinos --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4605153d6ca..d611c16f116 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -15,9 +15,9 @@ on: permissions: contents: read -concurrency: - group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.head_ref || github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} # this will cancel only PRs +# concurrency: +# group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.head_ref || github.ref }} +# cancel-in-progress: ${{ github.event_name == 'pull_request' }} # this will cancel only PRs jobs: analyze: From dc63ed97eaf920d760a095dae3b2795e67a8c9c2 Mon Sep 17 00:00:00 2001 From: Konstantinos Date: Mon, 14 Jul 2025 21:37:00 +0200 Subject: [PATCH 4/4] adopting suggestion from @firewave Signed-off-by: Konstantinos --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d611c16f116..c3713d1a9fc 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -15,9 +15,9 @@ on: permissions: contents: read -# concurrency: -# group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.head_ref || github.ref }} -# cancel-in-progress: ${{ github.event_name == 'pull_request' }} # this will cancel only PRs +concurrency: + group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} # this will cancel only PRs jobs: analyze: