Skip to content

Make Cache Key Optional? #210

@danrbailey

Description

@danrbailey

Is it possible to make the key optional and hence make the cache action read-only? This is in the case that you know that you only want to read from one of the "restore" keys and to fail if you can't find one.

For clarity, look for restore key patterns only:

On cache hit - read the cache, don't attempt to write a new one.
On cache miss - job fail.

An alternative could be to recognize a specific string as the key which means skip the write on job completion:

      uses: actions/cache@v1
      with:
        path: cache
        key: donotwrite
        restore-keys: myexpectedcache-

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions