github / codeql-action

Actions for running CodeQL analysis
MIT License
1.12k stars 310 forks source link

Automatically clean up old TRAP caches #2306

Closed henrymercer closed 3 months ago

henrymercer commented 3 months ago

This PR implements a new feature, behind a flag, that keeps only the newest TRAP cache for each language.

We call the Actions cache APIs directly as these have not yet been added to the @actions/cache npm package.

I have added a unit test exercising most of the functionality, and have also tested this manually using a test repo. I think an integration test is probably not worth it, particularly on this repo where the databases are small enough that TRAP caching skips the upload anyway.

Merge / deployment checklist