Skip to content

Commit

Permalink
Updated save option changes in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
toote committed Jul 27, 2024
1 parent 08995cf commit 12fd2be
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ The file or folder to cache.

The maximum caching level to restore, if available. See [the available caching levels](#caching-levels)

#### `save` (string, specific values)
#### `save` (string or array of strings, specific values)

The level to use for saving the cache. See [the available caching levels](#caching-levels)
The level(s) to use for saving the cache. See [the available caching levels](#caching-levels).

You can specify multiple levels in an array to save the same artifact as a cache for all those levels.

## Options

Expand Down Expand Up @@ -118,7 +120,7 @@ You can always have more complicated logic by using the plugin multiple times wi
* second step:
- will restore the file-level cache of the `node_modules` folder saved by the first step and run `npm test`
* third step (that will only run on the `master` branch):
- will restore the file-level cache saved by the first step, run `npm run deploy` and finally save the contents of the `node_modules` folder as a pipeline-level cache for usage as a basis even when the lockfile changes (in the first step)
- will restore the file-level cache saved by the first step, run `npm run deploy` and finally save the contents of the `node_modules` folder as both a pipeline-level and global (all-level) cache for usage as a basis even when the lockfile changes (in the first step)

```yaml
steps:
Expand Down Expand Up @@ -147,7 +149,9 @@ steps:
manifest: package-lock.json
path: node_modules
restore: file
save: pipeline
save:
- pipeline
- all
```

Expand Down

0 comments on commit 12fd2be

Please sign in to comment.