From f2f342f7c2272e57ca8e9d8d7506518af4855349 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Wed, 30 Apr 2025 11:45:56 +0100 Subject: [PATCH] ci: Specify concurrency for github workflows (#2059) --- .github/workflows/build.yml | 5 +++++ .github/workflows/build_clio_docker_image.yml | 6 ++++++ .github/workflows/check_libxrpl.yml | 5 +++++ .github/workflows/clang-tidy.yml | 5 +++++ .github/workflows/docs.yml | 4 +++- .github/workflows/nightly.yml | 5 +++++ .github/workflows/sanitizers.yml | 5 +++++ .github/workflows/update_docker_ci.yml | 5 +++++ 8 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94726b07..30ccde7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,11 @@ on: branches: [master, release/*, develop] workflow_dispatch: +concurrency: + # Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build-and-test: name: Build and Test diff --git a/.github/workflows/build_clio_docker_image.yml b/.github/workflows/build_clio_docker_image.yml index ae3cbde7..74db2844 100644 --- a/.github/workflows/build_clio_docker_image.yml +++ b/.github/workflows/build_clio_docker_image.yml @@ -1,4 +1,5 @@ name: Build and publish Clio docker image + on: workflow_call: inputs: @@ -37,6 +38,11 @@ on: description: Whether to strip clio binary default: true +concurrency: + # Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build_and_publish_image: name: Build and publish image diff --git a/.github/workflows/check_libxrpl.yml b/.github/workflows/check_libxrpl.yml index 6d604994..62d110eb 100644 --- a/.github/workflows/check_libxrpl.yml +++ b/.github/workflows/check_libxrpl.yml @@ -4,6 +4,11 @@ on: repository_dispatch: types: [check_libxrpl] +concurrency: + # Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: CONAN_PROFILE: gcc diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index f7f88f85..1ae192be 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -11,6 +11,11 @@ on: - .github/workflows/clang-tidy.yml workflow_call: +concurrency: + # Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: CONAN_PROFILE: clang diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 864cb451..09ee35e3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,5 @@ name: Documentation + on: push: branches: [develop] @@ -10,7 +11,8 @@ permissions: id-token: write concurrency: - group: "pages" + # Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 97cbf9c9..a8b2023d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -9,6 +9,11 @@ on: - ".github/workflows/nightly.yml" - ".github/workflows/build_clio_docker_image.yml" +concurrency: + # Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build-and-test: name: Build and Test diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml index 5b8c467b..d1d4f7bf 100644 --- a/.github/workflows/sanitizers.yml +++ b/.github/workflows/sanitizers.yml @@ -8,6 +8,11 @@ on: paths: - ".github/workflows/sanitizers.yml" +concurrency: + # Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build-and-test: name: Build and Test diff --git a/.github/workflows/update_docker_ci.yml b/.github/workflows/update_docker_ci.yml index 9d31b42f..49648e6e 100644 --- a/.github/workflows/update_docker_ci.yml +++ b/.github/workflows/update_docker_ci.yml @@ -18,6 +18,11 @@ on: - ".github/actions/build_docker_image/**" workflow_dispatch: +concurrency: + # Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build_and_push: name: Build and push docker image