Skip to content

Commit faa3c52

Browse files
author
Martin Lopes
committed
Update caching-dependencies-to-speed-up-workflows.md
1 parent 59c8c8b commit faa3c52

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

content/actions/guides/caching-dependencies-to-speed-up-workflows.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,16 @@ For more information, see [`actions/cache`](https://github.com/actions/cache).
5959

6060
- `key`: **Required** The key created when saving a cache and the key used to search for a cache. Can be any combination of variables, context values, static strings, and functions. Keys have a maximum length of 512 characters, and keys longer than the maximum length will cause the action to fail.
6161
- `path`: **Required** The file path on the runner to cache or restore. The path can be an absolute path or relative to the working directory.
62-
- With `v2` of the `cache` action, you can specify a single path, or multiple paths as a block of newline-separated lines. Paths can be either directories or single files, and glob patterns are supported.
62+
- Paths can be either directories or single files, and glob patterns are supported.
63+
- With `v2` of the `cache` action, you can specify a single path, or multiple paths as a block of newline-separated lines. For example:
64+
```
65+
- name: Cache multiple paths
66+
uses: actions/cache@v2
67+
with:
68+
path: |
69+
~/cache
70+
~/cache/subdir
71+
```
6372
- With `v1` of the `cache` action, only a single path is supported and it must be a directory. You cannot cache a single file.
6473
- `restore-keys`: **Optional** An ordered list of alternative keys to use for finding the cache if no cache hit occurred for `key`.
6574

0 commit comments

Comments
 (0)