mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-10-22 20:30:41 +02:00
43 lines
984 B
YAML
43 lines
984 B
YAML
name: SonarCloud
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, development ]
|
|
workflow_dispatch:
|
|
|
|
permissions: read-all
|
|
|
|
env:
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
SONAR_ORGANIZATION: craftaro
|
|
SONAR_PROJECT_KEY: craftaro_CraftaroCore
|
|
|
|
jobs:
|
|
Analyze:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Prepare Workspace
|
|
uses: ./.github/actions/setup_project_workspace
|
|
|
|
- name: 'Cache: SonarCloud'
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.sonar/cache
|
|
key: ${{ runner.os }}-sonar
|
|
|
|
- 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"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|