Skip to content

Commit

Permalink
Limit CI concurrency to one per PR
Browse files Browse the repository at this point in the history
In current workflow, when newer commit comes, old pipeline won't get
canceled, which wastes resources and cause unnecessary CI failure
emails. This PR limits concurrency to one per PR. when newer
commit comes, stale CI jobs will be automatically cancelled.

See: https://stackoverflow.com/a/72408109/8711684
  • Loading branch information
Ray-Eldath committed Oct 11, 2023
1 parent 4dd1f2f commit 1077bb9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} # from https://stackoverflow.com/a/72408109/8711684
cancel-in-progress: true

env:
BUILD_TYPE: "debug"
FTS_MODE: "internal_fts"
Expand Down

0 comments on commit 1077bb9

Please sign in to comment.