Skip to content

Commit 2c15b3f

Browse files
committed
ci: Run analysis on PRs if they have 'sonar' or 'analysis' in the branch name
Signed-off-by: Larry Gritz <[email protected]>
1 parent 6494a4a commit 2c15b3f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/analysis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,15 @@ on:
2525
- '!**/docs.yml'
2626
- '!**.properties'
2727
- '!docs/**'
28+
# Run analysis on PRs only if the branch name indicates that the purpose of
29+
# the PR is related to the Sonar analysis. We don't run on every PR because
30+
# the analysis run is very expensive and just isn't usually necessary.
31+
pull_request:
32+
branches:
33+
- '*analysis*'
34+
- '*sonar*'
2835
# Allow manual kicking off of the workflow from github.com
2936
workflow_dispatch:
30-
# Uncomment the following line if we want to run analysis on all PRs:
31-
# pull_request:
3237

3338
permissions: read-all
3439

0 commit comments

Comments
 (0)