Skip to content

GitHub Actions Cache

Avrea accelerates the GitHub Actions cache by intercepting cache API requests and serving them from colocated storage. Workflows using actions/cache@v4+ and language setup actions work with no workflow changes.

On Avrea runners, cache requests from actions/cache@v4+ are transparently routed to a local cache proxy instead of GitHub's Azure blob storage. This also applies to caching built into setup actions:

- uses: actions/setup-go@v6
with:
go-version: '1.25'
# Built-in dependency caching works automatically
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
# npm dependency cache works automatically

Any action that uses GitHub's Cache v2 API works with no changes:

A typical workflow with caching, with no workflow changes:

workflow.yml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
- run: npm ci
- run: npm test

Avrea's colocated cache is significantly faster than GitHub's. Expect up to 5x faster cache restore times on Avrea. Restore speeds scale with cache size.

Any action or tool that uses GitHub's Cache v2 API works with Avrea's cache proxy. This includes first-party actions, third-party actions, and build tools that integrate with the GitHub Actions cache API. No forks or wrappers are needed. If it works on GitHub, it works on Avrea.

Caches are scoped by repository and Git ref (branch or tag), matching GitHub's native behavior:

  • The default branch can read and write caches.
  • Feature branches can read caches from the default branch and write to their own scope.
  • Pull requests can restore caches from the base branch and the default branch.
  • Sibling and child branches cannot access each other's caches.
  • Caches are keyed by (key, version) and are immutable once created.
  • There is no cross-repository cache access. Each repository has its own isolated namespace.

Multiple workflow runs in the same repository and branch share caches.

Caches are shared across jobs in the same workflow and across workflow runs. A common pattern is saving the cache in a build job and restoring it in test jobs:

workflow.yml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/cache@v5
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
test:
needs: build
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/cache@v5
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm test

For details on cache key patterns, restore-keys, and how setup-* actions handle caching, see GitHub's Dependency caching reference. Everything described there works identically on Avrea runners.