Skip to content

Commit 04c3609

Browse files
committed
fix: Only run reviews on pull_request events to avoid duplicates
- Added github.event_name == 'pull_request' check to reviews job - Fixed concurrency group to use head_ref for proper PR branch handling - Prevents duplicate review runs when pushing to PR branches
1 parent c150a79 commit 04c3609

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/ci-pipeline.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ permissions:
1616
statuses: write
1717

1818
concurrency:
19-
group: ci-pipeline-${{ github.ref }}
19+
# Use head_ref for PRs, ref_name for pushes - ensures same branch cancels previous runs
20+
group: ci-pipeline-${{ github.head_ref || github.ref_name }}
2021
cancel-in-progress: true
2122

2223
jobs:
@@ -298,12 +299,14 @@ jobs:
298299
299300
# =============================================================================
300301
# STAGE 4: Code Reviews (runs after prerequisites pass)
302+
# Only runs on pull_request events to avoid duplicates
301303
# =============================================================================
302304
reviews:
303305
name: Code Reviews
304306
needs: [config, basic-ci-complete, e2e-tests]
305307
if: |
306308
always() &&
309+
github.event_name == 'pull_request' &&
307310
needs.config.outputs.reviews_enabled == 'true' &&
308311
needs.basic-ci-complete.result == 'success' &&
309312
needs.basic-ci-complete.outputs.success == 'true' &&

0 commit comments

Comments
 (0)