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