mirror of
https://github.com/rharkor/caching-for-turbo.git
synced 2025-06-09 09:35:17 +09:00
1.3 KiB
1.3 KiB
Caching for Turborepo
Caching for Turborepo, using GitHub Actions’ cache service.
How to use
Add this to your GitHub Actions workflow, before running turbo build
.
- name: Cache for Turbo
uses: rharkor/caching-for-turbo@v1.5
The action will:
-
Launch a server on
localhost:41230
(and wait for it to be ready). -
Export the
TURBO_API
,TURBO_TOKEN
andTURBO_TEAM
environment variables for use byturbo build
. -
Set up a post-build step to print the server logs (for debugging).
Configuration
Configuration is optional. Here are the available options and their default values:
with:
# Set the prefix for the cache keys.
cache-prefix: turbogha_
Development
To run the tests:
Start a server in a separate terminal:
npm run dev-run
Run the tests:
npm test
License
This project is licensed under the MIT License - see the LICENSE file.
The code was inspired by dtinth but was entirely rewritten to be more robust.