Skip to content

Commit

Permalink
feat(ci): Add workflow concurrency settings
Browse files Browse the repository at this point in the history
The goal is to prevent race condition and save execution time from long running jobs.
  • Loading branch information
PerfectSlayer committed Dec 31, 2024
1 parent 0dc9c08 commit de97030
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/analyze-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
# The branches below must be a subset of the branches above
branches: [ master ]

# Cancel long-running jobs when a new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
datadog-static-analyzer:
name: Analyze changes with DataDog Static Analyzer
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check-pull-requests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- master
- release/v*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
check_pull_requests:
name: Check pull requests
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-download-releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
types:
- released
workflow_dispatch:
concurrency: # Avoid running multiple instances to prevent asset conflicts
group: ${{ github.workflow }}
jobs:
update-releases:
permissions:
Expand Down

0 comments on commit de97030

Please sign in to comment.