The runner has a temporary directory that gets cleaned up after each job. You can access it by doing process.env['RUNNER_TEMP'], this can be used for a lot of things such as creating temporary files for tests or during a job and users don't need to worry about this being cleaned up.
A lot of first party actions and third party actions could use this. A lot of first party actions are in-fact using the temp directory currently:
- cache
- tool-cache
setup-java and setup-python will soon be using the temp directory too for a variety of things
A method should be added to either @actions/io or @actions/core that will allow users to quickly get a temporary directory.
There should also be documentation added that mentions when this gets cleaned up, and under what circumstances it won't (runner crashes)
The runner has a temporary directory that gets cleaned up after each job. You can access it by doing
process.env['RUNNER_TEMP'], this can be used for a lot of things such as creating temporary files for tests or during a job and users don't need to worry about this being cleaned up.A lot of first party actions and third party actions could use this. A lot of first party actions are in-fact using the
tempdirectory currently:setup-javaandsetup-pythonwill soon be using thetempdirectory too for a variety of thingsA method should be added to either
@actions/ioor@actions/corethat will allow users to quickly get a temporary directory.There should also be documentation added that mentions when this gets cleaned up, and under what circumstances it won't (runner crashes)