actions / download-artifact

MIT License
1.44k stars 498 forks source link

[feat req] add a clean directory option #332

Open nicola-lunghi opened 6 months ago

nicola-lunghi commented 6 months ago

What would you like to be added?

I would like an option to clean the artifacts directory before downloading the artifacts. Currently the artifact directory is kept for every job run, so a lot of rubbish is accumulated there. Also we had issue where one job was using previously downloaded artifacts by mistake.

Another nice option would be to use the runner.temp directory instead of the workspace directory for downloading artifacts

I would like an option like the git checkout option:

     clear: true

Why is this needed?

To avoid errors caused by older artifacts in the directory and to keep the runners clean

jmecosta commented 3 months ago

not only that, but with self hosted agents that dont run on docker the file system is preserved and we have encountered many times old dlls causing runtime issues.

this should really be considered, see how Teamcity handles this.