exam questions

Exam GH-200 All Questions

View all questions & answers for the GH-200 exam

Exam GH-200 topic 2 question 15 discussion

Actual exam question from Microsoft's GH-200
Question #: 15
Topic #: 2
[All GH-200 Questions]

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?

  • A. on:
    pull_request_label:
    branches:
    - 'releases'
    paths:
    - 'apps/**'
  • B. on:
    pull_request:
    types: [labeled]
    branches:
    - 'releases/**'
    paths:
    - 'apps'
  • C. on:
    pull_request:
    types: [labeled]
    branches:
    - 'releases'
    paths:
    - 'apps/**'
  • D. on:
    pull_request_review:
    types: [labeled]
    branches:
    - 'releases'
    paths:
    - 'apps/**'
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
MaharshiRabari
7 hours, 53 minutes ago
Selected Answer: C
Explanation: pull_request event – Triggers workflows on pull request activities. types: [labeled] – Ensures the workflow triggers only when a label is added to the PR. branches: ['releases'] – Limits the trigger to PRs targeting the releases branch. paths: ['apps/**'] – Ensures the workflow triggers only if files in the apps folder are changed.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...