From 3d33c756bd313f43ec55071b1954f6a63e75cc40 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 29 Dec 2022 10:29:19 -0600 Subject: [PATCH] [ci] automatically cancel GitHub Actions runs for outdated commits (#5651) --- .github/workflows/cuda.yml | 5 +++++ .github/workflows/python_package.yml | 5 +++++ .github/workflows/r_package.yml | 5 +++++ .github/workflows/static_analysis.yml | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index 50a3aa71d..946f54878 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -9,6 +9,11 @@ on: - master - release/* +# automatically cancel in-progress builds if another commit is pushed +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: github_actions: 'true' os_name: linux diff --git a/.github/workflows/python_package.yml b/.github/workflows/python_package.yml index edab12769..f046aecc1 100644 --- a/.github/workflows/python_package.yml +++ b/.github/workflows/python_package.yml @@ -9,6 +9,11 @@ on: - master - release/* +# automatically cancel in-progress builds if another commit is pushed +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: CONDA_ENV: test-env GITHUB_ACTIONS: 'true' diff --git a/.github/workflows/r_package.yml b/.github/workflows/r_package.yml index ae4e44da7..72d24eb9a 100644 --- a/.github/workflows/r_package.yml +++ b/.github/workflows/r_package.yml @@ -9,6 +9,11 @@ on: - master - release/* +# automatically cancel in-progress builds if another commit is pushed +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: # hack to get around this: # https://stat.ethz.ch/pipermail/r-package-devel/2020q3/005930.html diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 0419e4783..415cbb660 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -11,6 +11,11 @@ on: - master - release/* +# automatically cancel in-progress builds if another commit is pushed +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: COMPILER: 'gcc' CONDA_ENV: test-env