Skip to content

Commit da26e28

Browse files
feat(ci): Add workflow concurrency settings (#8136)
The goal is to prevent race condition and save execution time from long running jobs.
1 parent 0dc9c08 commit da26e28

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.github/workflows/analyze-changes.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
# The branches below must be a subset of the branches above
88
branches: [ master ]
99

10+
# Cancel long-running jobs when a new commit is pushed
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1015
jobs:
1116
datadog-static-analyzer:
1217
name: Analyze changes with DataDog Static Analyzer

.github/workflows/check-pull-requests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches:
66
- master
77
- release/v*
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
810
jobs:
911
check_pull_requests:
1012
name: Check pull requests

.github/workflows/update-download-releases.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
types:
55
- released
66
workflow_dispatch:
7+
concurrency: # Avoid running multiple instances to prevent asset conflicts
8+
group: ${{ github.workflow }}
79
jobs:
810
update-releases:
911
permissions:

0 commit comments

Comments
 (0)