Skip to content

Commit

Permalink
Limit workflow job concurrency (#3277)
Browse files Browse the repository at this point in the history
* Limit workflow job concurrency

https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency

* Limit workflow

* Use workflow level concurrency
  • Loading branch information
yixinglu committed Nov 5, 2021
1 parent 7e25396 commit 58f0b44
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
schedule:
- cron: '0 18 * * *'

concurrency:
group: nightly
cancel-in-progress: true

defaults:
run:
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- master
- 'v[0-9]+.*'

concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true

defaults:
run:
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
types:
- published

concurrency:
group: release
cancel-in-progress: true

defaults:
run:
shell: bash
Expand Down

0 comments on commit 58f0b44

Please sign in to comment.