GH-200 · Question #14
GH-200 Question #14: Real Exam Question with Answer & Explanation
The correct answer is C: on:. {"question_number": 10, "correct_answer": "C", "explanation": "To deploy to different environments based on pull request labels, triggered only on the releases branch and only when files under the 'apps' folder change, the correct trigger block uses the pull_request event with 't
Question
As a DevOps engineer, you need to execute a deployment to different environments like development and testing based on the labels added to a pull request. The deployment should use the releases branch and trigger only when there is a change in the files under 'apps' folder. Which code block should be used to define the deployment workflow trigger?
Options
- Aon:
- Bon:
- Con:
- Don:
Explanation
{"question_number": 10, "correct_answer": "C", "explanation": "To deploy to different environments based on pull request labels, triggered only on the releases branch and only when files under the 'apps' folder change, the correct trigger block uses the pull_request event with 'types: [labeled]' to fire on label activity, 'branches: [releases]' to restrict the trigger to the releases branch, and 'paths: ["apps/**"]' to scope it to changes under the apps directory. Options A, B, and D are incorrect because they either use the wrong event type, omit required filters, or use unsupported syntax for this combination of trigger conditions.", "generated_by": "claude-sonnet", "llm_judge_score": 4}
Topics
Community Discussion
No community discussion yet for this question.