actions / actions/toolkit

Add support for non-GitHub-hosted caching for self-hosted runners

Open
#1,051 5 comments 44 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Describe the enhancement

Right now, Action caching isn't very useful when using self-hosted GitHub Actions runners: I have runners deployed on my own hardware but the cached data is being sent to and from GitHub cache servers. The time and cost of making those transfers across the Internet and back makes caching almost entirely pointless for self-hosted runners.

Instead I'd like the ability to use the GitHub Actions caching API to cache data on my own servers nearer my runners.

What's missing:

  • there's no downloadable cache server implementation that we can use to run a cache server somewhere else
  • there's no documentation for how to write such a caching server even if GitHub doesn't provide one
  • it doesn't look like there's any ability to control the action/toolkit cache package to make it work with a non-GitHub server. I can see there's an ACTIONS_CACHE_URL that is provided by the runner environment and points to a GitHub server, but there's no easy way to override that. Even if there were, it looks like the cache system authenticates using ACTIONS_RUNTIME_TOKEN, which also lacks documentation or the ability to override. It's also used for more than just caching, so if I did somehow override it to point to a custom caching server, it would break something else in the actions runner.

Additional information
Add any other context about the feature here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the action/toolkit cache package and how it handles ACTIONS_CACHE_URL and ACTIONS_RUNTIME_TOKEN. Define the scope across a downloadable server, cache-server protocol documentation, and configurable endpoint and authentication behavior; done should provide a usable documented path for caching on self-hosted infrastructure.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.