Note
Users are recommended to use rharkor/caching-for-turbo instead. It is a drop-in replacement, so existing users can migrate easily.
Warning
This action is no longer actively maintained, and there have been breaking changes to the underlying API that makes this action no longer work.
Original README file contents below:
The dtinth/setup-github-actions-caching-for-turbo
action launches a custom Turborepo Remote Caching Server (codenamed “turbogha”) that leverages GitHub Actions’ Cache Service API as a backing storage, and then configures Turborepo to use it.
Add this to your GitHub Actions workflow, before running turbo build
.
- uses: dtinth/setup-github-actions-caching-for-turbo@v1
The action will:
-
Launch a server on
localhost:41230
(and waits for it to be ready). -
Exports the
TURBO_API
,TURBO_TOKEN
andTURBO_TEAM
environment variables for use byturbo build
. -
Sets up a post-build step to print the server logs (for debugging).
Configuration is optional. Here are the available options and their default values:
with:
# Set the prefix for the cache keys.
cache-prefix: turbogha_
This project is experimental and is provided as-is. It relies on GitHub Actions Cache Service API, for which there is no official documentation (however it’s been used by Docker Build as a cache backend for a long time). It is only tested to work with GitHub Actions’ hosted runners running on Linux. Please do not expect that it will be stable or work in all cases. Feel free to open an issue if you have any questions or problems, but I have no plans to provide support beyond my own use cases. If you need this action to work in your use case, you are welcome to fork this project and make changes to suit your needs in accordance with the MIT License.