CI: add concurrency limits for pr test

Add concurrency limits for pull request test so that on pull request
refresh old jobs are cancelled.

The group is created based on the github ref + workflow name and the
workflow is cancelled only it it comes from a pull_request event.
Push events are not affected by this limit.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2023-01-11 13:52:38 +01:00
parent dca1b92ecd
commit cb679adf18
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
4 changed files with 16 additions and 0 deletions

View File

@ -21,6 +21,10 @@ on:
permissions: permissions:
contents: read contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs: jobs:
determine_targets: determine_targets:
name: Set targets name: Set targets

View File

@ -23,6 +23,10 @@ on:
permissions: permissions:
contents: read contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs: jobs:
build: build:
name: Build Packages with external toolchain name: Build Packages with external toolchain

View File

@ -15,6 +15,10 @@ on:
permissions: permissions:
contents: read contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs: jobs:
determine_targets: determine_targets:
name: Set targets name: Set targets

View File

@ -15,6 +15,10 @@ on:
permissions: permissions:
contents: read contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs: jobs:
build-macos-latest: build-macos-latest:
name: Build tools with macos latest name: Build tools with macos latest