GitHub Foundations — Question 21

Which of the following scenarios requires a developer to explicitly use the GITHUB_TOKEN or github.token secret within a workflow? (Choose two.)

Answer options

Correct answer: A, B

Explanation

The correct answers are A and B because both scenarios require the explicit use of the GITHUB_TOKEN to function properly. Option C does not require this as the actions/checkout@v3 action automatically uses the GITHUB_TOKEN without needing to pass it explicitly. Option D is incorrect because assigning non-default permissions is a configuration step rather than a direct usage of the token within a workflow.