From bd34c194cb0c92729d4b330494a03ab7833b10b5 Mon Sep 17 00:00:00 2001 From: Marco Pasqualetti <24919330+marcalexiei@users.noreply.github.com> Date: Tue, 28 Jan 2025 08:30:33 +0100 Subject: [PATCH] ci: add `concurrency` flag for CI workflows (#448) --- .github/workflows/docker-ci.yml | 4 ++++ .../workflows/{ci-documentation.yml => documentation-ci.yml} | 4 ++++ .../{deploy-documentation.yml => documentation-deploy.yml} | 0 .github/workflows/repo-root-ci.yml | 4 ++++ .github/workflows/{rust.yml => rust-ci.yml} | 4 ++++ .github/workflows/spell-checking.yml | 4 ++++ .github/workflows/{typescript.yml => typescript-ci.yml} | 4 ++++ 7 files changed, 24 insertions(+) rename .github/workflows/{ci-documentation.yml => documentation-ci.yml} (90%) rename .github/workflows/{deploy-documentation.yml => documentation-deploy.yml} (100%) rename .github/workflows/{rust.yml => rust-ci.yml} (93%) rename .github/workflows/{typescript.yml => typescript-ci.yml} (91%) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 582076bb..398d4880 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -9,6 +9,10 @@ on: - 'main' pull_request: +concurrency: + group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: build_and_test: name: Build and Test Docker Image on ${{ matrix.os }} diff --git a/.github/workflows/ci-documentation.yml b/.github/workflows/documentation-ci.yml similarity index 90% rename from .github/workflows/ci-documentation.yml rename to .github/workflows/documentation-ci.yml index 7f6b3959..c2347b86 100644 --- a/.github/workflows/ci-documentation.yml +++ b/.github/workflows/documentation-ci.yml @@ -20,6 +20,10 @@ on: - '!Cargo.toml' - 'apps/documentation/**' +concurrency: + group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: build: name: Check build diff --git a/.github/workflows/deploy-documentation.yml b/.github/workflows/documentation-deploy.yml similarity index 100% rename from .github/workflows/deploy-documentation.yml rename to .github/workflows/documentation-deploy.yml diff --git a/.github/workflows/repo-root-ci.yml b/.github/workflows/repo-root-ci.yml index f3bd6680..ca674503 100644 --- a/.github/workflows/repo-root-ci.yml +++ b/.github/workflows/repo-root-ci.yml @@ -10,6 +10,10 @@ on: - 'main' pull_request: +concurrency: + group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: format: name: Check format diff --git a/.github/workflows/rust.yml b/.github/workflows/rust-ci.yml similarity index 93% rename from .github/workflows/rust.yml rename to .github/workflows/rust-ci.yml index d7a4320d..809d7ce0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust-ci.yml @@ -6,6 +6,10 @@ on: - 'main' pull_request: +concurrency: + group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/spell-checking.yml b/.github/workflows/spell-checking.yml index 0eddd97e..a74c13ff 100644 --- a/.github/workflows/spell-checking.yml +++ b/.github/workflows/spell-checking.yml @@ -7,6 +7,10 @@ on: pull_request: +concurrency: + group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: spell_checking: name: LanguageTool diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript-ci.yml similarity index 91% rename from .github/workflows/typescript.yml rename to .github/workflows/typescript-ci.yml index 844ef8aa..59ddd57c 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript-ci.yml @@ -6,6 +6,10 @@ on: - 'main' pull_request: +concurrency: + group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: build_and_test: name: Check build and test