From fe3a34503cb54f30c932c329d40e615be14c1ddf Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Mon, 10 Oct 2022 11:28:17 +0300 Subject: [PATCH] Cancel old `mypy_primer` builds (#8873) --- .github/workflows/mypy_primer.yml | 10 +++++++--- .github/workflows/mypy_primer_comment.yml | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index 833bdffa8..c13d59f94 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -9,13 +9,17 @@ on: - '.github/workflows/mypy_primer.yml' - '.github/workflows/mypy_primer_comment.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read + jobs: mypy_primer: name: Run - if: github.actor != 'pre-commit-ci[bot]' runs-on: ubuntu-latest - permissions: - contents: read strategy: matrix: shard-index: [0, 1, 2, 3] diff --git a/.github/workflows/mypy_primer_comment.yml b/.github/workflows/mypy_primer_comment.yml index 551834026..13464f40c 100644 --- a/.github/workflows/mypy_primer_comment.yml +++ b/.github/workflows/mypy_primer_comment.yml @@ -14,6 +14,7 @@ permissions: jobs: comment: name: Comment PR from mypy_primer + if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest steps: - name: Download diffs