Serve the GitHub Actions cache API v2 #15

Open
opened 2026-08-03 13:17:59 +00:00 by day01 · 0 comments
Owner

The cache adapter implements only the v1 _apis/artifactcache routes
(crates/runner-cache-github-actions/src/server.rs:58-64). Buildx 0.35 and
actions/cache@v4 speak the newer twirp backend and pick it when
ACTIONS_RUNTIME_TOKEN and ACTIONS_RESULTS_URL are set — which the runner
already sets (context/environment/names.rs:155-158).

Consequences today:

  • --cache-to type=gha cannot be used, so release builds cache through the
    registry instead (.gitea/workflows/build-image.yml);
  • artifact and cache actions are pinned to @v3 in the compatibility suite.

Serving v2 alongside v1 removes both workarounds.

The cache adapter implements only the v1 `_apis/artifactcache` routes (`crates/runner-cache-github-actions/src/server.rs:58-64`). Buildx 0.35 and `actions/cache@v4` speak the newer twirp backend and pick it when `ACTIONS_RUNTIME_TOKEN` and `ACTIONS_RESULTS_URL` are set — which the runner already sets (`context/environment/names.rs:155-158`). Consequences today: - `--cache-to type=gha` cannot be used, so release builds cache through the registry instead (`.gitea/workflows/build-image.yml`); - artifact and cache actions are pinned to `@v3` in the compatibility suite. Serving v2 alongside v1 removes both workarounds.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: syncode/runner#15