https://github.com/boringcache/action-core
Shared core library for BoringCache GitHub Actions.
https://github.com/boringcache/action-core
caching ci cicd dependency-management github-actions utilities
Last synced: 3 months ago
JSON representation
Shared core library for BoringCache GitHub Actions.
- Host: GitHub
- URL: https://github.com/boringcache/action-core
- Owner: boringcache
- License: mit
- Created: 2026-01-22T11:54:16.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-02-23T20:46:58.000Z (4 months ago)
- Last Synced: 2026-02-24T03:16:54.958Z (4 months ago)
- Topics: caching, ci, cicd, dependency-management, github-actions, utilities
- Language: TypeScript
- Homepage: https://boringcache.com
- Size: 426 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @boringcache/action-core
Shared helpers used by BoringCache GitHub Actions.
This package is for action authors and internal integrations. If you are setting up a workflow, start with the public docs or one of the published actions instead.
## Install
```bash
npm install @boringcache/action-core
```
## Main helpers
- `ensureBoringCache(options)`: install or reuse the CLI on the runner.
- `execBoringCache(args, options)`: run the CLI from an action.
- `getAuthTokens()`: read the configured restore/save/legacy tokens.
- `hasRestoreToken()` / `hasSaveToken()`: capability-aware checks for action logic.
- `warnIfUsingLegacyApiToken()`: compatibility warning for old workflows.
## Auth model
- Restore flows prefer `BORINGCACHE_RESTORE_TOKEN`, then `BORINGCACHE_SAVE_TOKEN`, then `BORINGCACHE_API_TOKEN`.
- Save flows prefer `BORINGCACHE_SAVE_TOKEN`, then `BORINGCACHE_API_TOKEN`.
- Combined restore/save actions should skip save cleanly when no save-capable token is configured.
- Proxy-backed actions should downgrade to read-only when only a restore-capable token is available and the backend supports it.
- `BORINGCACHE_API_TOKEN` is a legacy fallback, not the preferred path for new workflows.
## Docs
- [GitHub Actions docs](https://boringcache.com/docs#action)
- [GitHub Actions auth and trust model](https://boringcache.com/docs#actions-auth)