diff --git a/.github/workflows/cross-version-tests.yml b/.github/workflows/cross-version-tests.yml index 829dcd35a204c..5ece206b074d8 100644 --- a/.github/workflows/cross-version-tests.yml +++ b/.github/workflows/cross-version-tests.yml @@ -32,8 +32,8 @@ on: - master concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} + cancel-in-progress: true defaults: run: diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index efcffc4661baa..444b0a64c2b0a 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -8,8 +8,8 @@ on: - cron: "0 7 * * *" concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} + cancel-in-progress: true defaults: run: diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index fba88ff2a4720..edc417a809a24 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -11,8 +11,8 @@ on: - branch-[0-9]+.[0-9]+ concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} + cancel-in-progress: true # Use `bash --noprofile --norc -exo pipefail` by default for all `run` steps in this workflow: # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun diff --git a/.github/workflows/release-note-category.yml b/.github/workflows/release-note-category.yml index af77fd15c79cb..37e36bf7d14b5 100644 --- a/.github/workflows/release-note-category.yml +++ b/.github/workflows/release-note-category.yml @@ -12,8 +12,8 @@ on: - unlabeled concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} + cancel-in-progress: true defaults: run: diff --git a/.github/workflows/test-package-build.yml b/.github/workflows/test-package-build.yml index ab569814738e7..22c39f670e142 100644 --- a/.github/workflows/test-package-build.yml +++ b/.github/workflows/test-package-build.yml @@ -7,8 +7,8 @@ on: branches: [master] concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} + cancel-in-progress: true defaults: run: