-
Notifications
You must be signed in to change notification settings - Fork 12
38 lines (32 loc) · 1.08 KB
/
sonarcloud.yml
File metadata and controls
38 lines (32 loc) · 1.08 KB
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
name: sonarcloud.io
on:
push:
branches:
- master
# do not validate pull requests because SONAR_TOKEN is available only for project owner
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- uses: actions/setup-java@v5
with:
java-version: 21
distribution: adopt
# requires by org.jenkins-ci.plugins:plugin:5.x
# can be deleted when default maven will be upgraded from 3.8.*
- uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.9
- name: Build and analyse
run: >
mvn --batch-mode package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
-Dsonar.projectKey=damianszczepanik_build-history-manager-plugin
-Dsonar.organization=damianszczepanik
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.token=$SONAR_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}