GH-200 · Question #19
As a developer, your Actions workflow often reuses the same outputs or downloaded dependencies from one run to another. To cache dependencies for a job, you are using the GitHub cache action. Which…
The correct answer is A. path: the file path on the runner to cache or restore C. key: the key created when saving a cache and the key used to search for a cache. Input parameters for the cache action [C] key: Required The key created when saving a cache and the key used to search for a cache. It can be any combination of variables, context values, static strings, and functions. Keys have a maximum length of 512 characters, and keys…
Question
As a developer, your Actions workflow often reuses the same outputs or downloaded dependencies from one run to another. To cache dependencies for a job, you are using the GitHub cache action. Which input parameters are required for this action? (Each correct answer presents part of the solution. Choose two.)
Options
- Apath: the file path on the runner to cache or restore
- Bdependency: the name and version of a package to cache or restore
- Ckey: the key created when saving a cache and the key used to search for a cache
- Drestore-keys: the copy action key used with cache parameter to cache the data
- Ecache-hit: the copy action key used with restore parameter to restore the data from the cache
- Fref: the ref name of the branch to access and restore a cache created
How the community answered
(49 responses)- A90% (44)
- D6% (3)
- E2% (1)
- F2% (1)
Explanation
Input parameters for the cache action [C] key: Required The key created when saving a cache and the key used to search for a cache. It 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 [A] path: Required The path(s) on the runner to cache or restore. https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching
Topics
Community Discussion
No community discussion yet for this question.