| 1 | name: "CodeQL" |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches-ignore: |
| 6 | - 'dependabot/**' |
| 7 | pull_request: |
| 8 | branches: [ main ] |
| 9 | paths-ignore: |
| 10 | - '**.md' |
| 11 | - 'docs/**' |
| 12 | |
| 13 | concurrency: |
| 14 | group: ${{ github.workflow }}-${{ github.ref }} |
| 15 | cancel-in-progress: true |
| 16 | |
| 17 | jobs: |
| 18 | analyze: |
| 19 | name: Analyze |
| 20 | runs-on: ubuntu-latest |
| 21 | |
| 22 | strategy: |
| 23 | fail-fast: false |
| 24 | matrix: |
| 25 | language: [ 'java' ] |
| 26 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] |
| 27 | # Learn more: |
| 28 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed |
| 29 | |
| 30 | steps: |
| 31 | - uses: actions/checkout@v4 |
| 32 | - uses: eclipse-edc/.github/.github/actions/setup-build@main |
| 33 | |
| 34 | # Initializes the CodeQL tools for scanning. |
| 35 | - name: Initialize CodeQL |
| 36 | uses: github/codeql-action/init@v3 |
| 37 | with: |
| 38 | languages: ${{ matrix.language }} |
| 39 | queries: +security-and-quality |
| 40 | # If you wish to specify custom queries, you can do so here or in a config file. |
| 41 | # By default, queries listed here will override any specified in a config file. |
| 42 | # Prefix the list here with "+" to use these queries and those in the config file. |
| 43 | # queries: ./path/to/local/query, your-org/your-repo/queries@main |
| 44 | |
| 45 | # Compiles production Java source (without tests) |
| 46 | - name: Build |
| 47 | run: ./gradlew compileJava --no-daemon |
| 48 | |
| 49 | - name: Perform CodeQL Analysis |
| 50 | uses: github/codeql-action/analyze@v3 |