Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-action: keep cache size constant #3602

Open
sven-dmlr opened this issue Nov 11, 2024 · 1 comment
Open

gh-action: keep cache size constant #3602

sven-dmlr opened this issue Nov 11, 2024 · 1 comment

Comments

@sven-dmlr
Copy link
Member

Situation

Currently the SecHub GH Action caches downloaded clients.
In case of "latest", regularly a new client will be downloaded.
So the cache size will increase forever

Wanted

Keep the cache lean and constant in size:

  • cache only the latest downloaded version (clean cache directory before downloading a new client)
  • after extraction delete the Files for other platforms than the current (e.g. keep linux-amd64 only)
@hamidonos
Copy link
Collaborator

hamidonos commented Jan 7, 2025

Suggestion:

Extract the download from within the index.js code into a separate GitHub action step (action.yml)
the step checks for the version and the implements the cache based on the real version
that way the index.js does not have to do anything with caching -> better separation of concerns
Furthermore GitHub will take care of automatically removing the cache for a specific version if it's not used anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants