2025-01-10 03:03:02 +01:00
|
|
|
---
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize, reopened]
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
name: SonarQube Scan
|
|
|
|
jobs:
|
|
|
|
sonarqube:
|
|
|
|
name: "SonarQube Trigger"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: "Initialize Environment"
|
|
|
|
uses: https://w9r.dev/w9r.dev/action-setup-environment@v1.1.4
|
|
|
|
with:
|
|
|
|
roleid: "${{ secrets.VAULT_ROLE_ID }}"
|
|
|
|
secretid: "${{ secrets.VAULT_SECRET_ID }}"
|
|
|
|
|
|
|
|
- name: "Cache SonarQube packages"
|
2025-02-18 20:01:25 +00:00
|
|
|
uses: https://github.com/actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
|
2025-01-10 03:03:02 +01:00
|
|
|
with:
|
|
|
|
path: ~/.sonar/cache
|
|
|
|
key: "${{ runner.os }}-sonar"
|
|
|
|
restore-keys: "${{ runner.os }}-sonar"
|
|
|
|
|
|
|
|
- name: "SonarQube Scan"
|
|
|
|
run: "mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar"
|