Addono / setup-github-actions-caching-for-turbo

Action to set up Turborepo Remote Caching to work with GitHub Actions' built-in cache instead of Vercel (codename: turbogha)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

turbogha, Turborepo Remote Caching Server API implementation for GitHub Actions

typescript-action status

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.

How to use

Add this to your GitHub Actions workflow, before running turbo build.

      - uses: dtinth/setup-github-actions-caching-for-turbo@v1

The action will:

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

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

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

Disclaimer

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.

About

Action to set up Turborepo Remote Caching to work with GitHub Actions' built-in cache instead of Vercel (codename: turbogha)

License:MIT License


Languages

Language:TypeScript 95.2%Language:JavaScript 4.8%