From bf1ec1d5d2ad372e08506a3b6befe8b3847d90ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Sat, 14 Oct 2023 00:56:39 +0200 Subject: [PATCH] ci: Configure the concurrency of the jobs (#853) --- .github/workflows/composer-root-version.yaml | 5 +++++ .github/workflows/e2e-tests.yaml | 5 +++++ .github/workflows/lint.yaml | 5 +++++ .github/workflows/release.yaml | 5 +++++ .github/workflows/security.yaml | 5 +++++ .github/workflows/tests.yaml | 5 +++++ 6 files changed, 30 insertions(+) diff --git a/.github/workflows/composer-root-version.yaml b/.github/workflows/composer-root-version.yaml index f230596d..8daff7ef 100644 --- a/.github/workflows/composer-root-version.yaml +++ b/.github/workflows/composer-root-version.yaml @@ -5,6 +5,11 @@ on: branches: [ main ] pull_request: +# See https://stackoverflow.com/a/72408109 +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cs-lint: runs-on: ubuntu-latest diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml index d3ea23fa..78d92d79 100644 --- a/.github/workflows/e2e-tests.yaml +++ b/.github/workflows/e2e-tests.yaml @@ -7,6 +7,11 @@ on: release: types: [ created ] +# See https://stackoverflow.com/a/72408109 +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: build-test-phar: runs-on: ubuntu-latest diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 14c315dc..737eea21 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -5,6 +5,11 @@ on: branches: [ main ] pull_request: +# See https://stackoverflow.com/a/72408109 +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cs: runs-on: ubuntu-latest diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b675fba6..636dd829 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,6 +7,11 @@ on: release: types: [ created ] +# See https://stackoverflow.com/a/72408109 +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: build-phar: runs-on: ubuntu-latest diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index 8d4367ae..0bdf9c29 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -7,6 +7,11 @@ on: release: types: [ created ] +# See https://stackoverflow.com/a/72408109 +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: security: runs-on: ubuntu-latest diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f11b74ec..c04f1b47 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -7,6 +7,11 @@ on: release: types: [ created ] +# See https://stackoverflow.com/a/72408109 +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: root-version: runs-on: ubuntu-latest