forked from mojohaus/sonar-maven-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 972 Bytes
/
build.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
on:
# Trigger analysis when pushing in master or pull requests, and when creating
# a pull request.
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
name: Main Workflow
jobs:
sonarcloud:
runs-on: self-hosted
steps:
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf \"${GITHUB_WORKSPACE}\"/..?* \"${GITHUB_WORKSPACE}\".[!.]* \"${GITHUB_WORKSPACE}\"*"
- uses: actions/checkout@v3
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
args: >
-Dsonar.organization=dbmeneses
- name: SonarCloud Scan
uses: sonarsource/[email protected]
with:
args: >
-Dsonar.organization=dbmeneses
-Dsonar.projectKey=test
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}