QuestionQ8

Secure and optimize automation

As a developer, your Actions workflow frequently reuses the same outputs or downloaded dependencies between runs. You are using the GitHub cache action to cache dependencies for a job. Which input parameters are required for this action? (Each correct answer presents part of the solution. Choose two.)

Choose two
  • A path: the file path on the runner to cache or restore
  • B dependency: the name and version of a package to cache or restore
  • C key: the key created when saving a cache and the key used to search for a cache
  • D restore-keys: the copy action key used with cache parameter to cache the data
  • E cache-hit: the copy action key used with restore parameter to restore the data from the cache
  • F ref: the ref name of the branch to access and restore a cache created
Explanation

The GitHub cache action requires path to identify the runner file system location to cache or restore and key to save and search for the cache. restore-keys is optional, and cache-hit is an output rather than an input.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!