|
| 1 | +# For most projects, this workflow file will not need changing; you simply need |
| 2 | +# to commit it to your repository. |
| 3 | +# |
| 4 | +# You may wish to alter this file to override the set of languages analyzed, |
| 5 | +# or to provide custom queries or build logic. |
| 6 | +# |
| 7 | +# ******** NOTE ******** |
| 8 | +# We have attempted to detect the languages in your repository. Please check |
| 9 | +# the `language` matrix defined below to confirm you have the correct set of |
| 10 | +# supported CodeQL languages. |
| 11 | +# |
| 12 | +name: "CodeQL code analysis" |
| 13 | + |
| 14 | +on: |
| 15 | + push: |
| 16 | + branches: main |
| 17 | + paths-ignore: |
| 18 | + - '**/*.md' |
| 19 | + - '**/*.txt' |
| 20 | + pull_request: |
| 21 | + branches: main |
| 22 | + paths-ignore: |
| 23 | + - '**/*.md' |
| 24 | + - '**/*.txt' |
| 25 | + - '.husky/**' |
| 26 | + - 'cypress/**' |
| 27 | + - 'charts/**' |
| 28 | + - 'dev/**' |
| 29 | + - 'docs/**' |
| 30 | + - 'frontend/charts/**' |
| 31 | + - 'backend/charts/**' |
| 32 | + - 'backend/ci/**' |
| 33 | + - 'backend/collection/**' |
| 34 | + - 'backend/openapi/**' |
| 35 | + - 'README.md' |
| 36 | + - 'CHANGELOG.md' |
| 37 | + schedule: |
| 38 | + - cron: '0 1 * * 1-5' # At 01:00 on every day-of-week from Monday through Friday. |
| 39 | + |
| 40 | +jobs: |
| 41 | + analyze: |
| 42 | + name: Analyze |
| 43 | + runs-on: ubuntu-latest |
| 44 | + defaults: |
| 45 | + run: |
| 46 | + working-directory: backend |
| 47 | + permissions: |
| 48 | + actions: read |
| 49 | + contents: read |
| 50 | + security-events: write |
| 51 | + |
| 52 | + strategy: |
| 53 | + fail-fast: false |
| 54 | + matrix: |
| 55 | + language: [ 'java' ] |
| 56 | + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] |
| 57 | + # Learn more about CodeQL language support at https://git.io/codeql-language-support |
| 58 | + |
| 59 | + steps: |
| 60 | + - name: Checkout repository |
| 61 | + uses: actions/checkout@v3 |
| 62 | + |
| 63 | + - name: Set up JDK 17 |
| 64 | + uses: actions/setup-java@v3 |
| 65 | + with: |
| 66 | + java-version: '17' |
| 67 | + distribution: 'temurin' |
| 68 | + |
| 69 | + # Initializes the CodeQL tools for scanning. |
| 70 | + - name: Initialize CodeQL |
| 71 | + uses: github/codeql-action/init@v2 |
| 72 | + with: |
| 73 | + languages: ${{ matrix.language }} |
| 74 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 75 | + # By default, queries listed here will override any specified in a config file. |
| 76 | + # Prefix the list here with "+" to use these queries and those in the config file. |
| 77 | + # queries: ./path/to/local/query, your-org/your-repo/queries@main |
| 78 | + # The queries security-extended and security-and-quality are built into CodeQL. |
| 79 | + config-file: ./.github/codeql/codeql-config.yml |
| 80 | + queries: +security-and-quality,security-extended |
| 81 | + |
| 82 | + - name: Cache maven packages |
| 83 | + uses: actions/cache@v3 |
| 84 | + with: |
| 85 | + path: ~/.m2 |
| 86 | + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} |
| 87 | + restore-keys: ${{ runner.os }}-m2 |
| 88 | + |
| 89 | + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
| 90 | + # If this step fails, then you should remove it and run the build manually (see below) |
| 91 | + #- name: Autobuild |
| 92 | + # uses: github/codeql-action/autobuild@v2 |
| 93 | + |
| 94 | + # ℹ️ Command-line programs to run using the OS shell. |
| 95 | + # 📚 https://git.io/JvXDl |
| 96 | + |
| 97 | + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
| 98 | + # and modify them (or add more) to build your code if your project |
| 99 | + # uses a compiled language |
| 100 | + - name: Build Package |
| 101 | + run: | |
| 102 | + mvn clean package --batch-mode -DskipTests |
| 103 | +
|
| 104 | + - name: Perform CodeQL Analysis |
| 105 | + uses: github/codeql-action/analyze@v2 |
0 commit comments