QuestionQ10

Consume and troubleshoot workflows

You have a GitHub Actions workflow YAML file that includes the following lines.

Question Image

Which two statements correctly describe the workflow's behavior? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

Choose two
  • A The workflow will publish a package to GitHub Packages.
  • B The workflow will publish a package to a Node Package Manager (npm) registry.
  • C The publish-npm workflow job will run only after the build job passes.
  • D The file is using a matrix strategy.
Explanation

needs: build makes build a required successful prerequisite for publish-npm; a dependent job is skipped when its prerequisite fails or is skipped unless an overriding condition is specified. JS-DevTools/npm-publish publishes to an npm registry by default, while publishing to GitHub Packages requires explicit GitHub Packages registry configuration.

Learn more

Community Discussion

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