Skip to content

Commit

Permalink
[ci] Only allow one workflow per PR/Branch (the last one)
Browse files Browse the repository at this point in the history
  • Loading branch information
mp-17 committed Nov 28, 2023
1 parent ec0e379 commit 5b4c064
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
name: ci
on: [push, pull_request]

# Only allow one workflow per PR/Branch (the last one)
# https://docs.github.com/en/actions/learn-github-actions/expressions
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# github.workflow: name of the workflow
# github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# Cancel in-progress runs when a new workflow with the same group name is triggered
cancel-in-progress: true

jobs:

#####################
Expand Down

0 comments on commit 5b4c064

Please sign in to comment.