From 47a8e1b156409777b92d90d09f84751619b30495 Mon Sep 17 00:00:00 2001 From: Wenhao Wu Date: Tue, 7 Dec 2021 11:58:58 +0800 Subject: [PATCH] [Enhance] Cancel previous runs that are not completed --- .github/workflows/build.yml | 4 ++++ .github/workflows/deploy.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16b7a309a..2e648e3a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,10 @@ name: build 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/deploy.yml b/.github/workflows/deploy.yml index 625f05079..6d47cef29 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.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-18.04