From 9145f285860f1cf9f3196affb3dedbe748996c8f Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Wed, 23 Dec 2020 19:01:21 +0100 Subject: [PATCH] Use maven cachen when running analyze job (#10888) Motivation: To prevent failures to problems while downloading dependencies we shoud cache these Modifications: Add maven cache Result: No more failures due problems while downloading dependencies --- .github/workflows/codeql-analysis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a987232292..3d3eddc83e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -36,6 +36,17 @@ jobs: # a pull request then we can checkout the head. fetch-depth: 2 + # Cache .m2/repository + - uses: actions/cache@v2 + env: + cache-name: verify-cache-m2-repository + with: + path: ~/.m2/repository + key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-pr-${{ env.cache-name }}- + ${{ runner.os }}-pr- + # If this run was triggered by a pull request event, then checkout # the head of the pull request instead of the merge commit. - run: git checkout HEAD^2