-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaction.yml
50 lines (47 loc) · 1.94 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: 'SonarQube Scan for C and C++'
description: 'Scan your C and C++ code with SonarQube to detect bugs, vulnerabilities and code smells.'
branding:
icon: check
color: green
inputs:
installation-path:
description: 'Directory where the sonar-scanner and build wrapper will be installed. Created if does not exists.'
required: false
default: '.sonar'
cache-binaries:
description: 'Controls if installed binaries are cached using GitHub cache.'
required: false
default: 'true'
outputs:
sonar-scanner-binary:
description: "Absolute path to sonar-scanner binary."
value: ${{ steps.setup-outputs.outputs.sonar-scanner-binary }}
build-wrapper-binary:
description: "Absolute path to build-wrapper binary."
value: ${{ steps.setup-outputs.outputs.build-wrapper-binary }}
runs:
using: "composite"
steps:
- name: Deprecation warning
shell: bash
run: |
echo "::warning title=SonarScanner::This action is deprecated and will be removed in a future release. Please use the sonarqube-scan-action and its install-build-wrapper sub-action instead."
- name: SonarQube Scan
id: scan
uses: sonarsource/sonarqube-scan-action/deprecated-c-cpp@v4.2.1
with:
installation-path: ${{ inputs.installation-path }}
cache-binaries: ${{ inputs.cache-binaries }}
- name: Setup action outputs
id: setup-outputs
shell: bash
env:
SONAR_SCANNER_BINARY: ${{ steps.scan.outputs.sonar-scanner-binary }}
BUILD_WRAPPER_BINARY: ${{ steps.scan.outputs.build-wrapper-binary }}
run: |
echo "::group::Action outputs"
echo "sonar-scanner-binary=${SONAR_SCANNER_BINARY}" >> $GITHUB_OUTPUT
echo "'sonar-scanner-binary' output set to '${SONAR_SCANNER_BINARY}'"
echo "build-wrapper-binary=${BUILD_WRAPPER_BINARY}" >> $GITHUB_OUTPUT
echo "'build-wrapper-binary' output set to '${BUILD_WRAPPER_BINARY}'"
echo "::endgroup::"