nerdexam
Microsoft

GH-200 · Question #61

As a developer, you are optimizing a GitHub workflow that uses and produces many different files. You need to determine when to use caching versus workflow artifacts. Which two statements are true?…

The correct answer is B. Use caching when reusing files that change rarely between jobs or workflow runs. D. Use artifacts when referencing files produced by a job after a workflow has ended. [B] Use caching when you want to reuse files that don't change often between jobs or workflow runs, such as build dependencies from a package management system. [D] Use artifacts when you want to save files produced by a job to view after a workflow run has ended, such as built…

Author and Maintain Workflows

Question

As a developer, you are optimizing a GitHub workflow that uses and produces many different files. You need to determine when to use caching versus workflow artifacts. Which two statements are true? (Each correct answer presents part of the solution. Choose two.)

Options

  • AUse artifacts to access the GitHub Package Registry and download a package for a workflow.
  • BUse caching when reusing files that change rarely between jobs or workflow runs.
  • CUse caching to store cache entries for up to 30 days between accesses.
  • DUse artifacts when referencing files produced by a job after a workflow has ended.

How the community answered

(31 responses)
  • A
    3% (1)
  • B
    94% (29)
  • C
    3% (1)

Explanation

[B] Use caching when you want to reuse files that don't change often between jobs or workflow runs, such as build dependencies from a package management system. [D] Use artifacts when you want to save files produced by a job to view after a workflow run has ended, such as built binaries or build logs. https://docs.github.com/en/[email protected]/actions/tutorials/store-and-share-data

Topics

#GitHub Actions#Workflow Optimization#Caching#Artifacts

Community Discussion

No community discussion yet for this question.

Full GH-200 Practice