Question 11
GH-200 Practice Test
GH-200 Practice Test practice questions, page 3 of 5, with answer review and explanations.
Question 12
What is the most secure way to store sensitive information in GitHub Actions workflows?
- Use environment variables in the workflow and store sensitive data directly in the variables.
- From the GitHub repository settings, store sensitive data as unencrypted text.
- Store the sensitive information as plain text in the workflow YAML file.
- Use GitHub Enterprise Managed User (OIDC) integration to dynamically fetch secrets from a third-party secrets manager.
Question 13
You create a self-hosted runner labeled as runner1. You need to ensure that a GitHub Actions workflow job runs only on runner1. Which YAML statement should you use?
- runs-on: [self-hosted, linux-xlarge]
- runs-on: - self-hosted - ubuntu-latest
- runs-on: [self-hosted, runner1]
- runs-on: self-hosted
Question 14
What is a role of GitHub Marketplace when using GitHub Actions?
- GitHub Marketplace restricts the use of third-party actions to only public repositories.
- GitHub Marketplace serves only as a billing dashboard for tracking paid actions.
- GitHub Marketplace provides a centralized location to discover, share, and publish reusable GitHub Actions workflows created by the community or vendors.
- GitHub Marketplace allows a user to deploy GitHub Actions workflows to any repository automatically without requiring permissions.
Question 15
How should you print a debug message in your workflow?
- echo "::debug::Set variable myVariable to true"
- echo "Set variable MyVariable to true" >> $DEBUG_MESSAGE
- echo "::add-mask::Set variable myVariable to true"
- echo "debug_message=Set variable myVariable to true" >> &GITHUB_OUTPUT