From b05cf5b2b59d9d0d78f918f1186cbcc29fcc98d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Wed, 18 Oct 2023 10:59:13 +0200 Subject: [PATCH] Cancel previous CI runs, don't run on draft PRs --- .github/workflows/ci.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 18477f0..085721c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,11 +11,21 @@ on: - "v*" # Also on PRs, just be careful not to publish anything pull_request: + types: [opened, synchronize, reopened, ready_for_review] +# Cancel any currently running workflows from the same PR, branch, or +# tag when a new workflow is triggered. +# +# https://stackoverflow.com/a/66336834 +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} jobs: ci: runs-on: ubuntu-20.04 + if: github.event.pull_request.draft == false + steps: - uses: actions/checkout@v3