diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 944cef64f5f..3cb3a4d5668 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -46,8 +46,11 @@ jobs: - name: Autobuild uses: github/codeql-action/autobuild@v3 - - name: Cache cleanup + - name: Pip cache cleanup shell: bash + # CODEQL_PYTHON is only defined if dependencies were installed [0] + # [0] https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning?learn=code_security_actions&learnProduct=code-security#analyzing-python-dependencies + if: ${{ env.CODEQL_PYTHON != '' }} run: | $CODEQL_PYTHON -m pip cache info $CODEQL_PYTHON -m pip cache purge