Add concurrency control and cancel to CI workflows

Signed-off-by: Tao He <sighingnow@gmail.com>
This commit is contained in:
Tao He 2023-01-10 14:15:25 +08:00
parent 0624711824
commit 8e313e5b28
3 changed files with 12 additions and 0 deletions

View File

@ -2,6 +2,10 @@ name: Build Deb Package
on: [push, pull_request] on: [push, pull_request]
concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}

View File

@ -2,6 +2,10 @@ name: Build and Test
on: [push, pull_request] on: [push, pull_request]
concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}

View File

@ -2,6 +2,10 @@ name: Build & Test on CentOS Latest
on: [push, pull_request] on: [push, pull_request]
concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}