From b2dda6a5d3840d091a3520b8fc7c55751ffae631 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 17 Feb 2024 17:38:39 +0100 Subject: [PATCH] ci: Refactor conditions to check for branch events --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 169654044..8d6510882 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,8 +14,8 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - # Terminate all previous runs of the same workflow and branch, except for main and release branches - cancel-in-progress: "${{ !(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/rel-')) }}" + # Terminate all previous runs of the same workflow for pull requests + cancel-in-progress: "${{ github.event_name == 'pull_request' }}" jobs: Lint-Style: @@ -293,7 +293,7 @@ jobs: Build-Cabal-Arm: name: Build aarch64 (Cabal, GHC 9.4.8) - if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/rel-') }} + if: "${{ github.event_name == 'push' }}" runs-on: ubuntu-latest outputs: remotepath: ${{ steps.Remote-Dir.outputs.remotepath }}