quickstart →

Legacy caching options

Older ways to cache on RunsOn (runs-on/cache, sccache s3, BuildKit type=s3, runs-on/snapshot), kept for reference with what replaces each one.

These options still appear in older workflows. Each entry says what replaces it. Use them only if you are on an older RunsOn version, or have a reason not to switch.

The S3 options below write straight to the stack’s S3 cache bucket with the runner’s IAM role, instead of going through Magic Cache. They still work, but they keep the runner role’s stack-wide access to the bucket’s cache/* prefix, and cache isolation does not cover them.

runs-on/cache action#

runs-on/cache ↗ is a drop-in replacement for actions/cache that saves to an S3 bucket. It also works outside RunsOn, for example on GitHub-hosted runners, where it falls back to GitHub’s cache.

Replaced by: Magic Cache (extras=s3-cache), which serves actions/cache itself, with no change to cache steps. See GitHub Actions cache. The repository’s README ↗ covers setup, including the unset-current-credentials option.

sccache: s3#

The sccache: s3 input of runs-on/action@v2 points sccache straight at the stack’s S3 bucket, under one prefix that every branch of the repository shares.

Replaced by: remote_cache: sccache since v3.6.0, which follows GitHub’s cache scopes. See sccache compilation cache.

BuildKit type=s3#

Buildx’s type=s3 cache backend can point at the stack’s cache bucket on a runner with extras=s3-cache:

cache-from: type=s3,blobs_prefix=${{ env.RUNS_ON_S3_CACHE_REPO_PREFIX }}/buildkit/,manifests_prefix=${{ env.RUNS_ON_S3_CACHE_REPO_PREFIX }}/buildkit/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }}
cache-to: type=s3,blobs_prefix=${{ env.RUNS_ON_S3_CACHE_REPO_PREFIX }}/buildkit/,manifests_prefix=${{ env.RUNS_ON_S3_CACHE_REPO_PREFIX }}/buildkit/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }},mode=max

Replaced by: type=gha, which Magic Cache serves from the same bucket with cache isolation. See Docker layer cache.

runs-on/snapshot action#

Before v3.2.0, the runs-on/snapshot@v1 ↗ action kept a directory on an EBS volume, snapshotted at the end of the job and restored by the next one. It creates and attaches volumes with the runner’s IAM role.

Replaced by: sticky disks (sticky= label and the sticky_cache input of runs-on/action@v2), where the RunsOn control plane manages the volumes and snapshots.

The action stops working once sticky-disk isolation is enabled, because isolation removes those EBS permissions from runner roles. Move every workflow to sticky disks first: see Upgrading safely.