|
1 | | -name: "CodeQL" |
2 | | - |
| 1 | +name: SonarQube Cloud (PRs) |
3 | 2 | on: |
4 | | - push: |
5 | | - branches: [ "master", "*-rc" ] |
6 | 3 | pull_request: |
7 | | - branches: [ "master", "*-rc" ] |
8 | | - schedule: |
9 | | - - cron: "0 0 * * *" |
10 | | - |
11 | | -# Declare default permissions as read only. |
12 | | -permissions: read-all |
13 | | - |
| 4 | + types: [opened, synchronize, reopened] |
14 | 5 | jobs: |
15 | | - analyze: |
16 | | - name: Analyze |
| 6 | + sonar: |
17 | 7 | runs-on: ubuntu-latest |
18 | | - permissions: |
19 | | - security-events: write |
20 | | - |
21 | | - strategy: |
22 | | - fail-fast: false |
23 | | - matrix: |
24 | | - language: [ python, java ] |
25 | | - |
26 | 8 | steps: |
27 | | - - name: Checkout |
28 | | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 |
29 | | - |
30 | | - - name: Setup Java JDK |
31 | | - if: ${{ matrix.language == 'java' }} |
32 | | - uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 #v4.7.1 |
| 9 | + - uses: actions/checkout@v4 |
33 | 10 | with: |
34 | | - java-version: '17' |
35 | | - distribution: 'temurin' |
36 | | - |
37 | | - - name: Before Index (java) |
38 | | - if: ${{ matrix.language == 'java' }} |
39 | | - run: ./configure.sh |
40 | | - |
41 | | - - name: Initialize CodeQL |
42 | | - uses: github/codeql-action/init@df559355d593797519d70b90fc8edd5db049e7a2 #v3.29.5 |
43 | | - with: |
44 | | - languages: ${{ matrix.language }} |
45 | | - queries: +security-and-quality |
46 | | - |
47 | | - - name: Autobuild |
48 | | - uses: github/codeql-action/autobuild@df559355d593797519d70b90fc8edd5db049e7a2 #v3.29.5 |
49 | | - |
50 | | - - name: Perform CodeQL Analysis |
51 | | - uses: github/codeql-action/analyze@df559355d593797519d70b90fc8edd5db049e7a2 #v3.29.5 |
| 11 | + fetch-depth: 0 |
| 12 | + - uses: actions/setup-java@v4 |
52 | 13 | with: |
53 | | - category: "/language:${{ matrix.language }}" |
| 14 | + distribution: temurin |
| 15 | + java-version: '17' |
| 16 | + - name: SonarQube Cloud Scan |
| 17 | + uses: SonarSource/sonarqube-scan-action@v5 |
| 18 | + env: |
| 19 | + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
0 commit comments