You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-18Lines changed: 19 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,23 +11,23 @@ To use the action, add it to a workflow in your repository:
11
11
name: Run SonarQube scanner
12
12
13
13
on:
14
-
workflow_dispatch:
15
-
pull_request:
16
-
push:
17
-
branches:
18
-
- main
14
+
workflow_dispatch:
15
+
pull_request:
16
+
push:
17
+
branches:
18
+
- main
19
19
20
20
jobs:
21
-
sonarqube-scanner:
22
-
runs-on: ubuntu-latest
23
-
steps:
24
-
- name: Checkout repository
25
-
uses: actions/checkout@v5
26
-
27
-
- name: Run SonarQube scan
28
-
uses: minvws/action-sonarqube@v1
29
-
with:
30
-
sonar-token: ${{ secrets.SONAR_TOKEN }}
21
+
sonarqube-scanner:
22
+
runs-on: ubuntu-latest
23
+
steps:
24
+
- name: Checkout repository
25
+
uses: actions/checkout@v5
26
+
27
+
- name: Run SonarQube scan
28
+
uses: minvws/action-sonarqube@v1
29
+
with:
30
+
sonar-token: ${{ secrets.SONAR_TOKEN }}
31
31
```
32
32
33
33
Make sure to add the `SONAR_TOKEN` secret to your repository's configuration. See [Using secrets in GitHub Actions](https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-secrets).
@@ -38,9 +38,10 @@ In this basic example, the workflow is executed automatically on push to the `ma
38
38
39
39
The action has the following inputs:
40
40
41
-
- `sonar-token`: the SonarQube token.
42
-
- `project-base-dir`: set the sonar.projectBaseDir analysis property, default is `.`.
43
-
- `allow-run-on-fork`: allow SonarQube scan to run on pull requests from forks (default: false).
41
+
- `sonar-token` (**required**): The SonarQube token.
42
+
- `project-base-dir` (optional): Set the `sonar.projectBaseDir` analysis property. Default is `.`.
43
+
- `allow-run-on-fork` (optional): Allow SonarQube scan to run on pull requests from forks. Default is `false`.
44
+
- `allow-run-on-dependabot` (optional): Allow SonarQube scan to run on pull requests created by Dependabot. Default is `false`.
0 commit comments