From 3c872e0ab3d801462df255fb0160118135218475 Mon Sep 17 00:00:00 2001 From: WRH <12756472+wangruohui@users.noreply.github.com> Date: Thu, 9 Dec 2021 20:58:35 +0800 Subject: [PATCH] [CI] Cancel previous runs that are not completed (#650) --- .github/workflows/build.yml | 4 ++++ .github/workflows/lint.yml | 4 ++++ .github/workflows/publish-to-pypi.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 93c79bab89..648c97a178 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,10 @@ on: - 'examples/**' - '.dev_scripts/**' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build_cpu: runs-on: ubuntu-18.04 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e2f9f8c977..37f4c53bba 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,6 +7,10 @@ on: 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 faf62a6db5..7f6cb15d27 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