diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index cd56d30d4..0a8b4f66a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,6 +38,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + # Cache .m2/repository + - uses: actions/cache@v2 + env: + cache-name: ${{ matrix.language }}-cache-m2-repository + with: + path: ~/.m2/repository + key: ${{ runner.os }}-analyze-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-analyze-${{ env.cache-name }}- + ${{ runner.os }}-analyze- + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v1