quickstart →

mbx remote cache

mbx remote cache for GitHub Actions, served by Magic Cache from your own S3 bucket. One action input, no cache server to run.

Magic Cache serves the remote cache of mbx ↗ from the RunsOn agent on every runner, in the cache bucket of your stack.

Availability#

Since v3.6.0, on runners with Magic Cache (extras=s3-cache), with Flex and Fleet. The Overview covers how build tool caches are scoped and stored.

Enable it#

.github/workflows/ci.yml
jobs:
build:
runs-on: runs-on=${{ github.run_id }}/runner=8cpu-linux-x64/extras=s3-cache
steps:
- uses: runs-on/action@v2
with:
remote_cache: mbx
- uses: actions/checkout@v5
- uses: jdx/mr-boxington-action@v1.7.2
with:
backend: remote
- run: mbx build --workspace --locked

Set up mbx after runs-on/action, so its setup finds MBX_REMOTE_URL. Unless the job sets MBX_REMOTE_NAMESPACE, the action sets it to the repository’s ID. Each namespace gets its own path in the cache, so set MBX_REMOTE_NAMESPACE in the job’s env:, where the action sees it. By default, mbx publishes only from pushes to protected branches, so pull requests read what their base branch published. mbx does not send its own credentials over plain HTTP: a job that sets MBX_REMOTE_TOKEN, MBX_REMOTE_TOKEN_FILE or MBX_REMOTE_OIDC_AUDIENCE gets a warning, and keeps its own remote. So does a job that sets MBX_REMOTE_S3_* settings, which mbx refuses with an HTTP cache.