Documentation
¶
Overview ¶
Package actioncache keeps a host-local cache of GitHub Action archives in the layout the actions runner reads through ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: <dir>/<owner>_<repo>/<sha>.tar.gz. The runner only reads it, so the agent fills it after each job from the actions that job's log says it downloaded.
Index ¶
Constants ¶
const DefaultMaxBytes = 2 << 30
DefaultMaxBytes caps the cache; the oldest archives go first past it.
const DirName = "actions"
DirName is the cache's directory under the agent state dir. The VM CLIs name a guest share after the host folder, so this is also its name in the guest.
const EnvVar = "ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE"
EnvVar points the runner at the cache directory.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
Dir string
MaxBytes int64
// Client returns the job scope's App client. Set it before the first fill.
Client func(scope string) *github.Client
// contains filtered or unexported fields
}
Cache fills and trims one host's archive directory.
func (*Cache) Fill ¶
Fill schedules a cache fill from a finished job. It never blocks: a full queue drops the job, which costs a later download, not a job.
func (*Cache) FillRun ¶ added in v0.2.15
FillRun schedules a cache fill from the job that runner ran in run runID of owner/repo, under scope's App client. Scale-set completions carry the Actions service job id, not the REST one, so the fill looks the job up by runner. It never blocks.