From 7f3424e1b88b4617b012515775aebab088e6668d Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Thu, 3 Feb 2022 22:06:35 +0100 Subject: [PATCH] Cancel workflows when they become outdated This change ensures that workflows are canceled when new changes come in which means resources aren't wasted on outdated workflows. More information: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7508886f..986525445 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,10 @@ on: pull_request: branches: [main] +concurrency: + group: ci-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: preflight: runs-on: ubuntu-latest