From 2045343bc9551477caeef4881bba14a343a7d76b Mon Sep 17 00:00:00 2001 From: Miao Zheng <76149310+MeowZheng@users.noreply.github.com> Date: Tue, 14 Dec 2021 16:19:02 +0800 Subject: [PATCH] [CI] Cancel previous runs that are not completed (#52) --- .github/workflows/build.yml | 3 +++ .github/workflows/lint.yml | 4 ++++ .github/workflows/publish-to-pypi.yml | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fd077d..abd8d1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,9 @@ on: - 'README.md' - 'README_zh-CN.md' - 'docs/**' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build_cpu: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 93272c5..875c71e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,6 +2,10 @@ name: lint on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint: runs-on: ubuntu-18.04 diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 1615b21..0a8bdf2 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -2,6 +2,10 @@ name: deploy on: push +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build-n-publish: runs-on: ubuntu-latest