From ba3affd4a98ce6f17ea30e83596931c50be77a60 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 8 Aug 2024 09:07:47 +0100 Subject: [PATCH] Avoid canceling jobs after merge (#34) Better concurrency --- .github/workflows/tox.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index d049846..2b02dd2 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -2,9 +2,6 @@ name: tox on: - create: # is used for publishing to PyPI and TestPyPI - tags: # any tag regardless of its name, no branches - - "**" push: # only publishes pushes to the main branch to TestPyPI branches: # any integration branch but not tag - "main" @@ -13,7 +10,9 @@ on: - "main" concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + # Avoids canceling push to main of the same commit (github.sha) but will + # cancel running builds when you update the source branch of a PR. + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}-${{ github.event.number || github.sha }} cancel-in-progress: true env: