-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (40 loc) · 1.5 KB
/
schedule-sonar.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# This workflow trigger a full Sonar analysis at regular interval
# Github actions command reference: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
name: Sonar Analysis - Scheduled
on:
workflow_dispatch:
schedule:
- cron: '0 4 * * 1,3,5' # At 4AM, on Monday, Wednesday and Friday
env:
MODULE_ID: userDashboard
jobs:
sonar-analysis:
name: Sonar Analysis
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
supported_branches: ["${{ github.event.repository.default_branch }}"]
container:
image: jahia/cimg-mvn-cache:ga_cimg_openjdk_8.0.312-node
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ matrix.supported_branches }}
- uses: jahia/jahia-modules-action/build@v2
with:
nexus_username: ${{ secrets.NEXUS_USERNAME }}
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
module_id: ${{ env.MODULE_ID }}
mvn_settings_filepath: '.github/maven.settings.xml'
- uses: jahia/jahia-modules-action/sonar-analysis@v2
with:
primary_release_branch: ${{ matrix.supported_branches }}
build_artifacts: ''
github_pr_id: ${{github.event.number}}
sonar_url: ${{ secrets.SONAR_URL }}
sonar_token: ${{ secrets.SONAR_TOKEN }}
mvn_settings_filepath: '.github/maven.settings.xml'