From 375c8b4e530b48cf5e4f236a86ac41661af16595 Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Tue, 17 Oct 2023 13:38:55 -0700 Subject: [PATCH] CI: Cancel in-progress jobs for the same PR/push ref --- .github/workflows/haskell.yml | 3 +++ .github/workflows/nix.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index d71fac4..eebf097 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -16,6 +16,9 @@ jobs: matrix: cabal: ["3.10"] ghc: ["8.8.4", "8.10.7", "9.0.2", "9.2.8", "9.4.6", "9.6.3"] + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.cabal }}-${{matrix.ghc}} + cancel-in-progress: true env: CONFIG: "--enable-tests" steps: diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 77fe7c6..963e5d7 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -20,6 +20,9 @@ jobs: - ghc92 - ghc94 - ghc96 + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.ghc }} + cancel-in-progress: true steps: - uses: actions/checkout@v3 - uses: cachix/install-nix-action@v19