Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

patricioperezv
Copy link

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

@patricioperezv patricioperezv requested a review from a team as a code owner January 12, 2024 06:45
@patricioperezv patricioperezv force-pushed the feature/add-tool-cache-toolkit branch from b5b8f26 to 4332f8c Compare January 12, 2024 06:47
@patricioperezv patricioperezv force-pushed the feature/add-tool-cache-toolkit branch from 4332f8c to 5376815 Compare January 12, 2024 06:47
@alambike
Copy link

@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?

@joshmgross
Copy link
Member

@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.

@patricioperezv
Copy link
Author

@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

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

Successfully merging this pull request may close these issues.

3 participants