https://github.com/boringcache/docker-action
Cache Docker BuildKit layers with BoringCache via OCI registry proxy.
https://github.com/boringcache/docker-action
caching ci cicd dependency-management github-actions utilities
Last synced: 3 months ago
JSON representation
Cache Docker BuildKit layers with BoringCache via OCI registry proxy.
- Host: GitHub
- URL: https://github.com/boringcache/docker-action
- Owner: boringcache
- Created: 2026-01-12T14:14:47.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-02-20T22:05:34.000Z (4 months ago)
- Last Synced: 2026-02-21T03:45:06.108Z (4 months ago)
- Topics: caching, ci, cicd, dependency-management, github-actions, utilities
- Language: TypeScript
- Homepage: https://boringcache.com
- Size: 1.34 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# boringcache/docker-action
Build Docker images with BuildKit cache backed by BoringCache.
By default this action runs a local OCI registry proxy, so BuildKit restores layers lazily instead of downloading the whole cache upfront.
## Quick start
```yaml
- uses: boringcache/docker-action@v1
with:
workspace: my-org/my-project
image: ghcr.io/${{ github.repository }}
tags: latest,${{ github.sha }}
env:
BORINGCACHE_SAVE_TOKEN: ${{ secrets.BORINGCACHE_SAVE_TOKEN }}
```
## Restore-only pull requests
The default `cache-backend: registry` path still needs a save-capable token today. For restore-only PR jobs, switch to `cache-backend: local` and use split tokens:
```yaml
- uses: boringcache/docker-action@v1
with:
workspace: my-org/my-project
image: ghcr.io/${{ github.repository }}
cache-backend: local
env:
BORINGCACHE_RESTORE_TOKEN: ${{ secrets.BORINGCACHE_RESTORE_TOKEN }}
BORINGCACHE_SAVE_TOKEN: ${{ github.event_name == 'pull_request' && '' || secrets.BORINGCACHE_SAVE_TOKEN }}
```
## Key inputs
| Input | Description |
|-------|-------------|
| `image` | Image name to build. |
| `workspace` | Workspace in `org/repo` form. Defaults to the repo name. |
| `tags` | Image tags. |
| `push` / `load` | Push to a registry or load into the local daemon. |
| `cache-backend` | `registry` for lazy proxy mode or `local` for explicit restore/save mode. |
| `cache-tag` | Override the cache tag derived from the image name. |
| `platforms` | Multi-platform build targets. |
| `build-args`, `secrets`, `target` | Common BuildKit build inputs. |
## Outputs
| Output | Description |
|--------|-------------|
| `image-id` | Built image ID. |
| `digest` | Built image digest. |
| `buildx-name` | Builder name. |
| `buildx-platforms` | Platforms supported by the builder. |
## Docs
- [GitHub Actions docs](https://boringcache.com/docs#docker-action)
- [GitHub Actions auth and trust model](https://boringcache.com/docs#actions-auth)
- [Native proxy integrations](https://boringcache.com/docs#cli-cache-registry)