Cancel workflows if PR is updated with a new commit (#931)
* Cancel workflows if PR is updated with a new commit Signed-off-by: Dave Thaler <dthaler@microsoft.com> * Fix typos Signed-off-by: Dave Thaler <dthaler@microsoft.com> Co-authored-by: Alan Jowett <alanjo@microsoft.com>
This commit is contained in:
Родитель
35bd9c6546
Коммит
64d1164e01
|
@ -13,6 +13,12 @@ on:
|
|||
- cron: '00 21 * * *'
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
# Cancel any CI/CD workflow currently in progress for the same PR.
|
||||
# Allow running concurrently with any other commits.
|
||||
group: cicd-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
checks: read # Required by reusable-test.yml to check build status.
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: Scorecards
|
||||
|
||||
on:
|
||||
|
@ -6,6 +9,12 @@ on:
|
|||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
concurrency:
|
||||
# Cancel any Scorecards workflow currently in progress for the same PR.
|
||||
# Allow running concurrently with any other commits.
|
||||
group: scorecards-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче