From 06ba83f4c606e304cf29da2b03da4ab926062a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Mann?= <64193442+joergmann@users.noreply.github.com> Date: Wed, 29 Jan 2025 14:34:05 +0100 Subject: [PATCH] ci: refactor concurrency (#402) --- .github/workflows/dependabot-automerge.yml | 7 +++++++ .github/workflows/enforce-changelog.yml | 6 ++++++ .github/workflows/integration-test.yml | 2 +- .github/workflows/lint.yml | 5 +++++ .github/workflows/prepare-next-version.yml | 5 ++++- .github/workflows/release.yml | 4 ++++ .github/workflows/test.yml | 2 +- 7 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml index 809fef55..c3b7f327 100644 --- a/.github/workflows/dependabot-automerge.yml +++ b/.github/workflows/dependabot-automerge.yml @@ -1,10 +1,16 @@ name: Dependabot auto-merge + on: pull_request permissions: contents: write pull-requests: write +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + + jobs: dependabot: runs-on: ubuntu-latest @@ -21,3 +27,4 @@ jobs: env: PR_URL: ${{github.event.pull_request.html_url}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + diff --git a/.github/workflows/enforce-changelog.yml b/.github/workflows/enforce-changelog.yml index 61ba7b1c..a05cd8a1 100644 --- a/.github/workflows/enforce-changelog.yml +++ b/.github/workflows/enforce-changelog.yml @@ -1,8 +1,14 @@ name: Enforce Changelog + on: pull_request: types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + + jobs: enforce-changelog: uses: cap-js/.github/.github/workflows/enforce-changelog.yml@main diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index a1719e28..a4977f90 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -18,7 +18,7 @@ on: workflow_dispatch: concurrency: - group: integration-test-${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d6e15c69..d9b6d1a3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,6 +7,11 @@ on: branches: [main] workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + + jobs: lint: uses: cap-js/.github/.github/workflows/lint.yml@main diff --git a/.github/workflows/prepare-next-version.yml b/.github/workflows/prepare-next-version.yml index d49e1a28..c42f1e9c 100644 --- a/.github/workflows/prepare-next-version.yml +++ b/.github/workflows/prepare-next-version.yml @@ -1,4 +1,3 @@ - name: Prepare Next Version on: @@ -18,6 +17,10 @@ permissions: contents: write pull-requests: write +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: prepare-next-version: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9954d258..d0a6ec24 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,10 @@ on: permissions: contents: write +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: release: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d1f7f12..5dec0a0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: concurrency: - group: test-${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true jobs: