From 98d46ea88883c41f51b757be93e6b03e4cd38cbc Mon Sep 17 00:00:00 2001 From: Hendrik van Antwerpen Date: Fri, 28 Jul 2023 14:38:19 +0200 Subject: [PATCH] Cancel workflow runs on new push --- .github/workflows/ci.yml | 5 +++++ .github/workflows/perf.yml | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 586f0b007..003970183 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,11 @@ on: schedule: - cron: "0 0 1,15 * *" +# In the event that there is a new push to the ref, cancel any running jobs because there are now obsolete, and wasting resources. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test-rust: runs-on: ubunut-latest diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 276f1279a..ef01d38c7 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -3,6 +3,12 @@ on: pull_request: paths: - 'stack-graphs/**' + +# In the event that there is a new push to the ref, cancel any running jobs because there are now obsolete, and wasting resources. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: BASE_REPO: ${{ github.event.pull_request.base.repo.owner.login }}/${{ github.event.pull_request.base.repo.name }} BASE_SHA: ${{ github.event.pull_request.base.sha }}