1
0
Fork 0
mirror of https://github.com/rharkor/caching-for-turbo.git synced 2025-06-09 09:35:17 +09:00
caching-for-turbo/README.md
2024-06-25 21:29:21 +02:00

1.3 KiB
Raw Blame History

Caching for Turborepo

typescript-action status

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:

  1. Launch a server on localhost:41230 (and wait for it to be ready).

  2. Export the TURBO_API, TURBO_TOKEN and TURBO_TEAM environment variables for use by turbo build.

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