From cffa0404745b61070ca85ce1f85d1cc6c1d68da7 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Mon, 30 Jan 2023 11:53:45 +0100 Subject: [PATCH] Cancel old builds if new commits appear Signed-off-by: Kristoffer Dalby --- .github/workflows/build.yml | 4 ++++ .github/workflows/lint.yml | 4 ++++ .github/workflows/test.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c79605c..0ecb0613 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9c080d72..7a63fe05 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,6 +3,10 @@ name: Lint on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: golangci-lint: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 774dfdd6..17ee7158 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,10 @@ name: Tests on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: test: runs-on: ubuntu-latest