1 parent
b0f1a4239b
commit
5cf378b2cc
1 file changed
+36
@@ -0,0 +1,36 @@
|
||||
# sonarqube-dotnet
|
||||
|
||||
Reusable Gitea Actions workflow: runs a SonarQube analysis for a .NET project. The steps are `dotnet sonarscanner begin`, then the build command, then `end`.
|
||||
|
||||
## Usage
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
sonar:
|
||||
uses: templates/sonarqube-dotnet/.gitea/workflows/sonarqube-dotnet.yaml@v1
|
||||
with:
|
||||
sonar-project-key: my-project
|
||||
# working-directory: .
|
||||
# dotnet-version: 10.0.x
|
||||
# build-command: dotnet build
|
||||
secrets:
|
||||
SONAR_HOST: ${{ secrets.SONAR_HOST }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
```
|
||||
|
||||
## Inputs / secrets
|
||||
|
||||
| Name | Required | Default | Description |
|
||||
|---|---|---|---|
|
||||
| `sonar-project-key` | yes | | SonarQube project key (`/k:`) |
|
||||
| `working-directory` | no | `.` | Where the build runs |
|
||||
| `dotnet-version` | no | `10.0.x` | .NET SDK version |
|
||||
| `build-command` | no | `dotnet build` | Build command between begin/end |
|
||||
| secret `SONAR_HOST` | yes | | SonarQube server URL |
|
||||
| secret `SONAR_TOKEN` | yes | | SonarQube token |
|
||||
|
||||
## Versioning
|
||||
|
||||
Only major tags (`v1`, `v2`, …). Fixes move the existing tag. Changing inputs or secrets needs a new major tag.
|
||||
|
||||
History before the move: [UltimateCoder/resuable-workflows](https://git.custom-coding.net/UltimateCoder/resuable-workflows).
|
||||
Reference in new issue
Block a user