actions / actions/toolkit

Allow updating an existing cache

Open
#505 33 comments 195 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

GitHub actions supports caching across builds which is super powerful. However, once a cache has been saved it can no longer be modified. While this is fine for most scenarios where you need the cache there are a few times when you would like to update it.

I created this PR on the actual cache action to allow updating a cache when providing it in configuration:

https://github.com/actions/cache/pull/353

I created it after reading the related issue:

https://github.com/actions/cache/issues/342

However, it seems like something either needs to change in this package or server-side on the actions cache.

My use-case for wanting to update a cache is when using GitHub actions in golang projects. Go supports a test cache which allows tests to be skipped if the code they use has not changed, which can significantly improve test times (especially in large projects). Each time I run my tests, I'd like to maintain a single cache for tests, that way, when a run completes I can update the cache and all my workflows share a single test cache

There are some extra use-cases described on the issue above.

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 reading the linked actions/cache pull request #353 and issue #342, then determine whether the requested cache update behavior belongs in this toolkit or the Actions cache service. The Go test-cache use case describes the desired outcome, but the issue does not identify files, tests, or a repository-side implementation boundary.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, go, typescript
Domain
devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.