From a2caa0d76212b95a0a515f4fdfa0383896600f96 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 d221c10..025314d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,13 @@ on: [push, pull_request] name: CI +# 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: clippy: name: cargo clippy