dependencies/.forgejo/workflows/sonarqube.yaml

31 lines
799 B
YAML
Raw Normal View History

2025-01-05 17:59:25 +01:00
---
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
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 05:54:50 +01:00
uses: https://w9r.dev/w9r.dev/action-setup-environment@v1.1.3
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"