GH-200 practice question 9 of 15

What is the right method to ensure users approve a workflow before the next step proceeds?

Full set: 100 questions
Answer options
A: creating a branch protection rule and only allow certain users access
B: granting users workflow approval permissions
C: adding users as required reviewers for an environment Correct answer
D: granting users repository approval permissions
Correct Answer:
C. adding users as required reviewers for an environment
Explanation

To require manual approval before a workflow job proceeds, you must configure an environment with required reviewers. When a workflow job references this environment, it will pause and wait for approval from at least one of the specified users or teams. This ensures that sensitive deployments or operations receive explicit sign-off before execution. This mechanism is a core feature of GitHub Actions for controlling deployments and is specifically tied to environments, not general repository or workflow permissions.

Why Incorrect

A. Branch protection rules safeguard branches from direct pushes or unapproved merges; they do not control the progression of individual workflow steps.
B. Granting workflow approval permissions is not a specific permission set in GitHub; approval is managed through environment protection rules.
D. Repository approval permissions relate to code reviews on pull requests, not approvals for running workflow jobs.

References

1. GitHub Docs. (2024). "Using environments for deployment". GitHub Docs. Retrieved from https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment. See the section "Required reviewers".

2. GitHub Docs. (2024). "Reviewing deployments". GitHub Docs. Retrieved from https://docs.github.com/en/actions/managing-workflow-runs/reviewing-deployments. This document details the process from the reviewer's perspective, confirming that environments are the mechanism for this control.

Scroll to Top