SongodaCore/.github/workflows/sonarcloud.yml

43 lines
983 B
YAML
Raw Normal View History

2021-10-30 15:22:23 +02:00
name: SonarCloud
on:
push:
branches: [ master, development ]
workflow_dispatch:
2021-10-30 15:22:23 +02:00
permissions: read-all
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_ORGANIZATION: craftaro
SONAR_PROJECT_KEY: craftaro_SongodaCore
2021-10-30 15:22:23 +02:00
jobs:
Analyze:
2021-10-30 15:22:23 +02:00
runs-on: ubuntu-latest
2021-10-30 15:22:23 +02:00
steps:
- uses: actions/checkout@v3
2021-10-30 15:22:23 +02:00
with:
fetch-depth: 0
2021-10-30 15:22:23 +02:00
- name: Prepare Workspace
uses: ./.github/actions/setup_project_workspace
2022-03-18 14:32:20 +01:00
2021-10-30 15:22:23 +02:00
- name: 'Cache: SonarCloud'
uses: actions/cache@v3
2021-10-30 15:22:23 +02:00
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
2021-10-30 15:22:23 +02:00
- name: Analyze project
run: >
mvn -B \
verify \
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.host.url=https://sonarcloud.io \
"-Dsonar.organization=$SONAR_ORGANIZATION" \
"-Dsonar.projectKey=$SONAR_PROJECT_KEY"
2021-10-30 15:22:23 +02:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}