From 191a293c38a999bc3ad90c3209342dbbe60ecd75 Mon Sep 17 00:00:00 2001 From: Jens Alfke Date: Mon, 4 Nov 2024 10:10:16 -0800 Subject: [PATCH] GitHub Actions: Added `concurrency` Bit of boilerplate to cancel running actions when a branch is updated. https://turso.tech/blog/simple-trick-to-save-environment-and-money-when-using-github-actions --- .github/workflows/cmake.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index a8912fa8..5d53d2f3 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -18,6 +18,11 @@ on: branches: - '**' +concurrency: + # Cancel any running actions when a branch is updated: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Debug