Skip to content

Commit 8d689fc

Browse files
author
Martin Lopes
authored
Merge pull request #5309 from kousu/patch-1
Explain that a "list" means "of lines" not of YAML
2 parents 7b99fd0 + e090495 commit 8d689fc

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 list. 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 you can add multiple paths on separate lines. For example:
64+
```
65+
- name: Cache Gradle packages
66+
uses: actions/cache@v2
67+
with:
68+
path: |
69+
~/.gradle/caches
70+
~/.gradle/wrapper
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)