From a1d53989695e9d65b286831a856c87e20fb6cc41 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 6 Oct 2022 14:06:47 +0200 Subject: [PATCH] build: Cancel in-progress job to free up concurrent groups (#5899) --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd1531632eb1..3d315b6495ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,12 @@ on: description: If the commit you want to test isn't the head of a branch, provide its SHA here required: false +# Cancel in progress workflows on pull_requests. +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: # We pin the exact version to enforce reproducable builds with node + npm. DEFAULT_NODE_VERSION: '16.15.1'