GH-200 Exam Questions
95 real GH-200 exam questions with expert-verified answers and explanations. Page 1 of 2.
- Question #1Implement and manage GitHub Actions workflows
Which default environment variable specifies the branch or tag that triggered a workflow?
GitHub ActionsEnvironment VariablesWorkflow ContextGITHUB_REF - Question #2Author and Maintain Workflows
As a developer, you need to add the correct syntax to allow the following workflow file to be triggered by multiple types of events. Which two code blocks should you add starting a...
GitHub ActionsWorkflow TriggersYAML SyntaxEvent Types - Question #3Implement and manage GitHub Actions workflows
You need to make a script to retrieve workflow run logs via the API. Which is the correct API to download a workflow run log?
GitHub APIWorkflow LogsREST APIAPI Endpoints - Question #4Implement and manage GitHub Actions workflows
You are reaching your organization's storage limit for GitHub artifacts and packages. What should you do to prevent the storage limit from being reached? (Each correct answer prese...
GitHub ActionsArtifactsStorage ManagementRetention Policy - Question #5Implement and manage GitHub Actions workflows
While awaiting approval, how many days can a workflow be in the "Waiting" state before it automatically fails?
workflow approvalwaiting statetimeoutautomatic failure - Question #6Author and Maintain Workflows
What is the proper syntax to reference the system-provided run number variable?
GitHub ActionsWorkflow expressionsSystem variablesVariable referencing - Question #7Implement and manage GitHub Actions workflows
How can a workflow deploy mitigate the risk of multiple workflow runs that are deploying to a single cloud environment simultaneously? (Each correct answer presents part of the sol...
GitHub ActionsConcurrency ControlDeployment WorkflowsEnvironments - Question #8Implement and manage GitHub Actions workflows
Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?
GitHub ActionsEnvironment VariablesWorkflow ContextGITHUB_ACTOR - Question #9Implement security for GitHub Actions
As a developer, you are configuring GitHub Actions to deploy VMs to production. A member of the VMOps team must provide approval before the deployment occurs. Which of the followin...
GitHub ActionsEnvironmentsDeployment Protection RulesRequired Approvals - Question #10Implement security for GitHub Actions
Which of the following is the lowest repository permission you need to have for downloading workflow artifacts?
GitHub ActionsWorkflow ArtifactsRepository PermissionsLeast Privilege - Question #11Implement and manage GitHub Actions workflows
Which statement is true regarding the ability to delete a workflow run?
Workflow runsDeletionWorkflow managementGitHub Actions - Question #12Author and Maintain Workflows
As a developer, how should you enable step debug logging for a workflow?
GitHub ActionsDebuggingWorkflow loggingEnvironment variables - Question #13Implement and manage GitHub Actions workflows
Which command can you include in your workflow file to set the output parameter for an action?
GitHub ActionsWorkflow outputsAction communicationWorkflow commands - Question #14Implement and manage GitHub Actions workflows
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...
GitHub ActionsWorkflow TriggersPull Request EventsPath Filtering - Question #15Author and Maintain Workflows
Which workflow commands send information from the runner? (Each correct answer presents a complete solution. Choose two.)
GitHub ActionsWorkflow commandsRunner communicationOutput parameters - Question #16Consume Workflows
Which of the following is the most common way to target a specific major release version?
Action versioningMajor releasesWorkflow syntaxConsuming actions - Question #17Create and manage custom actions
You are a DevOps engineer working on a custom action. You want to conditionally run a script at the start of the action, before the main entrypoint. Which code block should be used...
custom actionsaction.ymlaction lifecyclepre-action script - Question #18Author and Maintain Actions
As a developer, how can you identify a JavaScript action on GitHub?
Custom ActionsAction MetadataJavaScript Actionspackage.json - Question #19Implement and manage GitHub Actions workflows
As a developer, your Actions workflow often reuses the same outputs or downloaded dependencies from one run to another. To cache dependencies for a job, you are using the GitHub ca...
GitHub ActionsCachingWorkflow optimizationDependencies - Question #20Author and Maintain Actions
As a developer, how can you identify a composite action on GitHub?
GitHub ActionsComposite Actionsaction.ymlAction Manifest - Question #21Author and Maintain Actions
What can be used to set a failed status of an action from its code?
Exit codesAction failureStep status - Question #22Implement security for GitHub Actions
As a developer, you need to use GitHub Actions to deploy a microservice that requires runtime access to a secure token. This token is used by a variety of other microservices manag...
GitHub ActionsSecret ManagementOrganizational SecretsExternal Vaults - Question #23Manage GitHub Actions for the Enterprise
Which of the following statements are true regarding the use of GitHub Actions on a GitHub Enterprise Server instance? (Each correct answer presents a complete solution. Choose thr...
GitHub Enterprise ServerGitHub ActionsGitHub ConnectAction availability - Question #24Author and Maintain Workflows
In the following workflow file, line 5 interprets lines 3 and 4 as Python. Which of the following is a valid option to complete line 5? 1 steps: 2 - run: | 3 import os 4 print(os.e...
Workflow syntaxShell interpreterPython workflowsRun step configuration - Question #25Manage GitHub Actions for the Enterprise
As a developer, you need to make sure that only actions from trusted sources are available for use in your GitHub Enterprise Cloud organization. Which of the following statements a...
GitHub Actions securityEnterprise Action ManagementAction GovernanceInternal Marketplace - Question #26Create and manage custom actions
As a developer, you created a JavaScript action. What is the best way to test your JavaScript action?
Custom ActionsJavaScript ActionsTesting ActionsWorkflows - Question #27Author and Maintain Actions
When reviewing an action for use, what file defines its available inputs and outputs?
GitHub ActionsCustom ActionsAction Definitionaction.yml - Question #28Create and manage custom actions
Which files are required for a Docker container action in addition to the source code? (Each correct answer presents a partial solution. Choose two.)
Custom ActionsDocker Actionsaction.ymlDockerfile - Question #29Implement security for GitHub Actions
As a developer, you have configured an IP allow list on a GitHub organization. Which effects does the IP allow list have on GitHub Actions? (Each answer presents a complete solutio...
IP allow listGitHub Actions securitySelf-hosted runnersGitHub-hosted larger runners - Question #30Author and Maintain Workflows
You have exactly one Windows x64 self-hosted runner, and it is configured with custom tools. Which syntax could you use in the workflow to target that runner?
Self-hosted runnersWorkflow syntaxRunner labelsTargeting runners - Question #31Manage GitHub Actions for the Enterprise
An organization's policies specify only local actions are allowed. How should actions be distributed for this organization?
GitHub Actions distributionOrganizational policiesPrivate actionsInternal repositories - Question #32Implement security for GitHub Actions
A single secret must be accessed by workflows in specific repositories. What is the best way to create the secret?
GitHub Actions SecretsOrganization SecretsSecret ManagementAccess Control - Question #33Create and manage custom actions
What are the most significant advantages of adding documentation while distributing custom actions? (Each answer presents a complete solution. Choose two.)
Custom ActionsDocumentationREADME.mdAction Distribution - Question #34Implement and manage GitHub Actions workflows
A workflow that had been working now stalls in a waiting state until failing. The workflow file process-ml.yaml has not changed and contains jobs specifying runs-on: [gpu ]. Which...
GPU RunnersWorkflow TroubleshootingRunner ConfigurationJob Waiting State - Question #35Implement and manage GitHub Actions workflows
Your organization needs to simplify reusing and maintaining automation in your GitHub Enterprise Cloud. Which components can be directly reused across all repositories in an organi...
GitHub Actions reuseOrganization-level resourcesCustom actions sharingWorkflow templates - Question #36Manage GitHub Actions for the Enterprise
Which of the following is the best way for an enterprise to prevent certain marketplace actions from running?
Enterprise securityGitHub ActionsMarketplace actionsPolicy enforcementAllowlist - Question #37Create and manage custom actions
When creating and managing custom actions in an enterprise setting, which of the following is considered a best practice?
Custom ActionsBest PracticesRepository ManagementAction Versioning - Question #38Author and Maintain Workflows
In GitHub Actions, how is the success or failure of a step determined by its exit code?
GitHub ActionsStep executionExit codesWorkflow control flow - Question #39Author and Maintain Workflows
Which configuration lines correctly set the workflow name in a GitHub Actions workflow file? (Choose 2)
GitHub ActionsWorkflow syntaxWorkflow configurationYAML - Question #40Author and Maintain Actions
What repository visibility is required for a GitHub Action to be listed on GitHub Marketplace?
GitHub MarketplaceAction PublishingRepository Visibility - Question #41Implement security for GitHub Actions
Which GitHub Actions capability prevents secrets from appearing in workflow logs?
GitHub ActionsSecrets managementSecurityLog masking - Question #42Author and Maintain Workflows
In a workflow triggered by a pull request comment, which GitHub Actions context property contains the event payload used to access the comment text and the pull request number?
GitHub ActionsContextsEvent PayloadsWorkflow Triggers - Question #43Create and manage custom actions
Which repository files are required for a Docker container action and for a JavaScript action to run correctly? (Choose 3)
GitHub ActionsCustom ActionsAction Definition FilesAction Types - Question #44Author and Maintain Workflows
How should you print a debug message in your workflow?
GitHub ActionsWorkflow commandsDebuggingLogging - Question #45Author and Maintain Workflows
As a developer, you are designing a workflow and need to communicate with the runner machine to set environment variables, output values used by other actions, add debug messages t...
Workflow commandsRunner communicationGitHub ActionsEnvironment variables - Question #46Author and Maintain Workflows
When should you use the GITHUB_TOKEN in a workflow?
GITHUB_TOKENGitHub APIWorkflow authentication - Question #47Manage self-hosted runners
In which of the following scenarios should you use self-hosted runners? (Each correct answer presents a complete solution. Choose two.)
Self-hosted runnersGitHub-hosted runnersRunner capabilitiesWorkflow execution environment - Question #48Author and Maintain Workflows
As a developer, you need to leverage Redis in your workflow. What is the best way to use Redis on a self-hosted Linux runner without affecting future workflow runs?
GitHub Actions servicesSelf-hosted runnersWorkflow dependenciesContainer usage - Question #49Manage self-hosted runners
You installed specific software on a Linux self-hosted runner. You have users with workflows that need to be able to select the runner based on the identified custom software. Whic...
self-hosted runnersrunner labelsworkflow targetingrunner management - Question #50Author and Maintain Workflows
You need to trigger a workflow using the GitHub API for activity that happens outside of GitHub. Which workflow event do you use?
GitHub APIWorkflow EventsExternal Triggersrepository_dispatch