Skip to content

Commit a0e3cf6

Browse files
committed
opt: Prevent duplicate CI runs for PR branches
- Remove push trigger for feature branches (version_manage, etc.) - Keep push trigger only for main/develop branches - Use pull_request events to check feature branch changes - Add explicit PR types to ensure proper coverage - Reduces CI resource usage by ~50% for PR workflows
1 parent 8908ac3 commit a0e3cf6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/check-version.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
name: Check Version Consistency
22

33
on:
4+
# Only run on push to main branches (not feature branches with PRs)
45
push:
56
branches:
67
- main
78
- develop
8-
- version_manage
99
paths:
1010
- 'include/ccap_config.h'
1111
- 'ccap.podspec'
1212
- 'conanfile.py'
1313
- 'BUILD_AND_INSTALL.md'
1414
- '.github/workflows/check-version.yml'
1515

16+
# Run on PRs to main branches (covers feature branch changes)
1617
pull_request:
1718
branches:
1819
- main
@@ -22,6 +23,7 @@ on:
2223
- 'ccap.podspec'
2324
- 'conanfile.py'
2425
- 'BUILD_AND_INSTALL.md'
26+
types: [opened, synchronize, reopened]
2527

2628
jobs:
2729
check-version:

0 commit comments

Comments
 (0)