-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
48 lines (45 loc) · 1.48 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
name: Uses SonarScanner for dotnet
description: A GitHub Action to install sonarscanner with java, in a platform agnostic way
author: NOS Inovação
branding:
color: blue
icon: search
inputs:
version:
description: The version of the scanner to be used
required: false
default: 6.2.0
step:
description: The step to be used
required: true
default: 'begin'
sonar-url:
description: The url of the sonar server
required: true
sonar-token:
description: The token of the sonar server
required: true
project-key:
description: The project key of the sonar server
required: true
extra-args:
description: Extra arguments to be used
required: false
shell:
description: The shell to be used
required: false
default: powershell
runs:
using: composite
steps:
- name: install sonar-scanner via dotnet tool
shell: ${{ inputs.shell }}
run: dotnet tool install --global dotnet-sonarscanner --version ${{ inputs.version }}
- name: run sonar-scanner begin
shell: ${{ inputs.shell }}
if: ${{ inputs.step == 'begin' }}
run: dotnet sonarscanner ${{ inputs.step }} /k:"${{ inputs.project-key }}" /d:sonar.token="${{ inputs.sonar-token }}" /d:sonar.host.url="${{ inputs.sonar-url }}" ${{ inputs.extra-args }}
- name: run sonar-scanner end
shell: ${{ inputs.shell }}
if: ${{ inputs.step == 'end' }}
run: dotnet sonarscanner ${{ inputs.step }} /d:sonar.token="${{ inputs.sonar-token }}" ${{ inputs.extra-args }}