diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 488317edf..288f7d83c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -86,7 +86,7 @@ jobs: needs: changed-files permissions: actions: read - contents: read + contents: write security-events: write strategy: @@ -117,6 +117,11 @@ jobs: if: ${{ matrix.language == 'cpp' }} run: rm -rf archive/h/hack + - name: Try to remove CodeQL C++ database + if: ${{ matrix.language == 'cpp' }} + run: | + curl -f -L -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/TheRenegadeCoder/sample-programs/code-scanning/codeql/databases/cpp + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3