Skip to content

Commit 30b0eb4

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, and update the actions/cache version. Signed-off-by: Larry Gritz <[email protected]>
1 parent 190c3f0 commit 30b0eb4

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.github/workflows/analysis.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,27 @@ on:
1313
push:
1414
branches:
1515
- main
16+
- dev-1.14
17+
- dev-1.15
1618
- '*analysis*'
17-
paths-ignore:
18-
- '**.md'
19-
- '**.rst'
20-
- '**.tex'
19+
- '*sonar*'
20+
paths:
21+
- '**'
22+
- '!**.md'
23+
- '!**.rst'
24+
- '!**/ci.yml'
25+
- '!**/docs.yml'
26+
- '!**/scorecard.yml'
27+
- '!**/wheel.yml'
28+
- '!**.properties'
29+
- '!docs/**'
30+
# Run analysis on PRs only if the branch name indicates that the purpose of
31+
# the PR is related to the Sonar analysis. We don't run on every PR because
32+
# the analysis run is very expensive and just isn't usually necessary.
33+
pull_request:
34+
branches:
35+
- '*analysis*'
36+
- '*sonar*'
2137
# Allow manual kicking off of the workflow from github.com
2238
workflow_dispatch:
2339

.github/workflows/build-steps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
run: echo "date=`date -u +'%Y-%m-%dT%H:%M:%SZ'`" >> $GITHUB_OUTPUT
132132
- name: ccache-restore
133133
id: ccache-restore
134-
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
134+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
135135
with:
136136
path: ${{ env.CCACHE_DIR }}
137137
# path: ./ccache
@@ -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
@@ -184,7 +184,7 @@ jobs:
184184
popd
185185
- name: ccache-save
186186
id: ccache-save
187-
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
187+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
188188
with:
189189
path: ${{ env.CCACHE_DIR }}
190190
key: ${{inputs.nametag}}-${{steps.ccache_cache_keys.outputs.date}}

0 commit comments

Comments
 (0)