GitHub Foundations — Question 3
When should you use the GITHUB_TOKEN in a workflow?
Answer options
- A. when you want to make authenticated calls to the GitHub API
- B. when you want to connect to the runner via SSH
- C. when you want to access repository-level secrets
- D. when you want to call an action from the marketplace
Correct answer: A
Explanation
The GITHUB_TOKEN is specifically used for making authenticated requests to the GitHub API, allowing workflows to interact with GitHub securely. Options B, C, and D do not require the GITHUB_TOKEN; SSH connections and accessing repository-level secrets involve different authentication methods, while calling actions from the marketplace does not necessitate this token.