- Notifications
You must be signed in to change notification settings - Fork455
Add the @actions/tool-cache package#450
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
b5b8f26
to4332f8c
CompareSigned-off-by: Patricio Pérez <73832292+patricioperezv@users.noreply.github.com>
4332f8c
to5376815
Comparealambike commentedMar 26, 2025
@joshmgross for our use case it would also be useful to add this dependency, to be able to download and unzip some tools that we do not have by default in the image of our runners. Any chance this could be merged? |
@alambike or@patricioperezv could you clarify your use case? Are there examples we can add to the README for this? I'm fine with adding this if we have some solid use cases, the size of this package is small relative the current size of the action. |
As part of building actions with Python as the runtime, we've been using Bash to replicate the behavior of the tool-cache npm package. For example, we build a .pyz package, upload it to an internal raw repository as part of the action lifecycle, and then use a composite action in our YAML to run Bash commands that download the .pyz from the raw repository and move it to the expected tool-cache location. This process requires a lot of boilerplate code. Instead, we would like to continue using a composite action, but leverage the github-script action to download the .pyz package and store it directly in the tool-cache folder structure, thereby taking full advantage of our cache. I can write some examples around the use case |
Adding the
@actions/tool-cache
package is useful for providing non javascript/typescript actions some abilities around tool caching (i.e i could use the github-script action to download/extract tools from composite actions).This adds the
tc
variable to be able to reuse the tool-cache toolkit library