From f40f02cbc39a435757b3992b697c41760bb0730c Mon Sep 17 00:00:00 2001 From: stay-foolish-forever Date: Sat, 6 Jun 2026 15:53:54 +0800 Subject: [PATCH] docs(examples): add concurrency control to CI workflow examples - GitHub Actions: add concurrency group with cancel-in-progress to avoid redundant review runs on rapid pushes - GitLab CI: add interruptible and resource_group to cancel outdated review jobs when new commits are pushed to the same MR --- examples/github_actions/ocr-review.yml | 4 ++++ examples/gitlab_ci/.gitlab-ci.yml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/examples/github_actions/ocr-review.yml b/examples/github_actions/ocr-review.yml index ffeefb5..71d567c 100644 --- a/examples/github_actions/ocr-review.yml +++ b/examples/github_actions/ocr-review.yml @@ -18,6 +18,10 @@ name: OpenCodeReview PR Review +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + on: pull_request: types: [opened] diff --git a/examples/gitlab_ci/.gitlab-ci.yml b/examples/gitlab_ci/.gitlab-ci.yml index 9bcd372..aa8ff1d 100644 --- a/examples/gitlab_ci/.gitlab-ci.yml +++ b/examples/gitlab_ci/.gitlab-ci.yml @@ -16,6 +16,8 @@ stages: code-review: stage: review + interruptible: true + resource_group: mr-review-$CI_MERGE_REQUEST_IID image: node:20 only: - merge_requests