Skip to content

Commit a24d24b

Browse files
committed
ci: Fix change deprecated sonarqube action, improve run conditions
Swap out deprecated sonar related action for the new one. Also make some tweaks to the analysis workflow run conditions. Signed-off-by: Larry Gritz <[email protected]>
1 parent 190c3f0 commit a24d24b

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.github/workflows/analysis.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,24 @@ on:
1414
branches:
1515
- main
1616
- '*analysis*'
17-
paths-ignore:
18-
- '**.md'
19-
- '**.rst'
20-
- '**.tex'
17+
- '*sonar*'
18+
paths:
19+
- '**'
20+
- '!**.md'
21+
- '!**.rst'
22+
- '!**/ci.yml'
23+
- '!**/docs.yml'
24+
- '!**/scorecard.yml'
25+
- '!**/wheel.yml'
26+
- '!**.properties'
27+
- '!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*'
2135
# Allow manual kicking off of the workflow from github.com
2236
workflow_dispatch:
2337

.github/workflows/build-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ jobs:
163163
fi
164164
- name: Install sonar-scanner and build-wrapper
165165
if: inputs.sonar == '1'
166-
uses: sonarsource/sonarcloud-github-c-cpp@e4882e1621ad2fb48dddfa48287411bed34789b1 # v2.0.2
166+
uses: sonarsource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6.0.0
167167
- name: Build
168168
if: inputs.skip_build != '1'
169169
shell: bash

0 commit comments

Comments
 (0)