From 37074f962f1992c3bbf8e9ba17acbf41ef9d98de Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sat, 27 May 2023 13:15:21 -0500 Subject: [PATCH] maint/CI ~ terminate outdated-but-executing workflows (for non-default branches) --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5337bf..5f34cd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,13 @@ env: RUSTC_WRAPPER: 'sccache' SCCACHE_GHA_ENABLED: 'true' +# terminate execution of the current workflow group when there is a newer changeset detected +# * the group is defined by "WORKFLOW_NAME-REF", where REF can be a branch, tag, or pull-request reference +# * workflows executing for the default branch are excluded from termination +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }} + jobs: style_format: name: Style/format