GITHUB-ACTIONS · Question #40
As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your…
The correct answer is C. core.warning('Something went wrong, but it\'s not bad enough to fail the build.'). The core.warning() function from the @actions/core package is used to create a warning message in the workflow logs. This is an annotation type that informs users about issues that don't require failing the build but still need attention.
Question
As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?
Options
- Acore.info('Something went wrong, but it's not bad enough to fail the build.')
- Bcore.notice('Something went wrong, but it's not bad enough to fail the build.')
- Ccore.warning('Something went wrong, but it's not bad enough to fail the build.')
- Dcore.warn('Something went wrong, but it's not bad enough to fail the build.')
How the community answered
(28 responses)- A4% (1)
- B7% (2)
- C89% (25)
Explanation
The core.warning() function from the @actions/core package is used to create a warning message in the workflow logs. This is an annotation type that informs users about issues that don't require failing the build but still need attention.
Topics
Community Discussion
No community discussion yet for this question.