From 943ae3e236d98a014b0b7373c6ac86ab8ab97578 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Mon, 10 Oct 2022 13:14:54 +0200 Subject: [PATCH] build: Cancel in-progress jobs for CodeQL action --- .github/workflows/codeql-analysis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index facd3fa52abf..a684b8bfde14 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,13 +13,19 @@ name: 'CodeQL' on: push: - branches: [ master ] + branches: [master] pull_request: # The branches below must be a subset of the branches above branches: [master] schedule: - cron: '40 3 * * 0' +# Cancel in progress workflows on pull_requests. +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: analyze: name: Analyze