Skip to content

Commit 4d36776

Browse files
authored
Explain that a "list" means "of lines" not of YAML
If I try ``` - name: caching uses: actions/cache@v2 with: path: - ~/.cache key: build-${{ github.ref }} restore-keys: | build- ``` I just get an unexplained "Startup Failure": https://github.com/spine-generic/data-multi-subject/actions/runs/742876119. Switching to a YAML multiline string ``` - name: caching uses: actions/cache@v2 with: path: | ~/.cache key: build-${{ github.ref }} restore-keys: | build- ``` works: https://github.com/spine-generic/data-multi-subject/actions/runs/742878382
1 parent a1c882f commit 4d36776

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ 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+
- 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.
6363
- With `v1` of the `cache` action, only a single path is supported and it must be a directory. You cannot cache a single file.
6464
- `restore-keys`: **Optional** An ordered list of alternative keys to use for finding the cache if no cache hit occurred for `key`.
6565

0 commit comments

Comments
 (0)