https://github.com/felixmosh/turborepo-gh-artifacts
A TurboRepo local cache server which uploads artifact cache to GH artifacts.
https://github.com/felixmosh/turborepo-gh-artifacts
artifacts cache turborepo
Last synced: 6 months ago
JSON representation
A TurboRepo local cache server which uploads artifact cache to GH artifacts.
- Host: GitHub
- URL: https://github.com/felixmosh/turborepo-gh-artifacts
- Owner: felixmosh
- License: mit
- Created: 2022-01-13T15:45:39.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-04T12:00:17.000Z (8 months ago)
- Last Synced: 2025-04-09T15:05:37.631Z (6 months ago)
- Topics: artifacts, cache, turborepo
- Language: TypeScript
- Homepage:
- Size: 1.9 MB
- Stars: 129
- Watchers: 3
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# TurboRepo Github Artifacts action
This action allows you to use Github artifacts as [TurboRepo](https://github.com/vercel/turborepo) remote cache server.
## How it works?
It's starts a local TurboRepo server (on port `9080`) and uses Github artifacts as a caching storage.
## Setup
1. Add in your `workflow.yml` the following section **before** TurboRepo runs:
```yaml
- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
```2. Make turbo repo work with the local server
Enable `turbo` remote caching though environment variables.
```yaml
- name: Build
run: yarn build
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: 'foo'
```That's it 😋.
### Action inputs
The action has 1 **required** inputs:
- `repo-token` - A Github token with `repo` permission, usually the default `secrets.GITHUB_TOKEN` is enough.Pay ❤️, `GITHUB_TOKEN` must have [`actions: read`](https://docs.github.com/en/rest/reference/actions#get-an-artifact) permissions in order to be able to read repo's existing artifacts.
## Working Example
[Working example](https://github.com/felixmosh/turborepo-gh-artifacts-example) of the entire setup, based on `npx create-turbo@latest`.
## Useful Links
- [About the GITHUB_TOKEN secret](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret)
- [TurboRepo Caching](https://turborepo.org/docs/features/caching)
- [TurboRepo Remote Caching (Beta)](https://turborepo.org/docs/features/remote-caching)