GitHub Actions
Master automation with GitHub Actions.
4.8★★★★★(338 ratings)
20,378 studentsIntermediate- •Familiarity with basic IT concepts
- •Access to relevant platform tools for hands-on practice
- •Interest in pursuing GH-200 certification
- •Design and secure workflows. Use events
- •jobs
- •and strategies. Manage secrets and runners. Create reusable actions and composite actions. Debug and optimize pipelines.
Validates your ability to design, secure, and optimize workflows across repositories and organizations. You’ll build CI/CD pipelines, reusable actions, and event‑driven automation.
What you'll learn
- Teaches how to create complex workflows triggered by events, manage secrets, and secure runner environments. You’ll also learn to share and version workflows at scale.
GH-200
Lectures1
Questions42
Duration30 week
Students20,378
$20.00
Full Free Question Bank (42 Questions)
GitHub Actions (GH-200) Practice Questions & Verified Answers
Click any option to test your knowledge, or reveal the verified answer and detailed explanation below each question.
Question #1Part 1
Aecho "::debug::Set variable myVariable to true"
Becho "Set variable MyVariable to true" >> $DEBUG_MESSAGE
Cecho "::add-mask::Set variable myVariable to true"
Decho "debug_message=Set variable myVariable to true" >> &GITHUB_OUTPUT
✓ Verified Answer: A
Question #2Part 1Select 2
By default, which workflows can use an action stored in internal repository? (Each answer presents a complete solution. Choose two.)
Aselected public repositories outside of the enterprise
Binternal repositories owned by the same organization as the enterprise
Cpublic repositories owned by the same organization as the enterprise
Dprivate repositories owned by an organization of the enterprise
✓ Verified Answer: BD
Question #3Part 1
What is the simplest action type to run a shell script?
ABash script action
BComposite action
CJavaScript action
DDocker container action
✓ Verified Answer: B
Question #4Part 1Select 2
Which choices represent best practices for publishing actions so that they can be consumed reliably? (Each correct answer presents a complete solution. Choose two.)
Adefault branch
Bcommit SHA
Crepo name
Dtag
Eorganization name
✓ Verified Answer: BD
Question #5Part 1
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 to the output logs, and other tasks. Which of the following options should you use?
Acomposite run step
Benable debug logging
Cself-hosted runners
Denvironment variables
Eworkflow commands
✓ Verified Answer: E
Question #6Part 1
Which default environment variable specifies the branch or tag that triggered a workflow?
AGITHUB_REF
BGITHUB_BRANCH
CENV_BRANCH
DGITHUB_TAG
✓ Verified Answer: A
Question #7Part 1
What is the most suitable action type for a custom action written in TypeScript?
ADocker container action
BBash script action
Ccomposite run step
DJavaScript action
✓ Verified Answer: D
Question #8Part 1
What is a valid scenario regarding environment secrets?
Aconfiguring environment secrets for connecting to GitHub Enterprise Server
Bconfiguring environment secrets to automatically pull from Azure Key Vault
Censuring a job cannot access environment secrets until approval is obtained from a required reviewer
Densuring only a specific step can access an environment secret
✓ Verified Answer: C
Question #9Part 1
When should you use the GITHUB_TOKEN in a workflow?
Awhen you want to make authenticated calls to the GitHub API
Bwhen you want to connect to the runner via SSH
Cwhen you want to access repository-level secrets
Dwhen you want to call an action from the marketplace
✓ Verified Answer: A
Question #10Part 1Select 2
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 at line 5? (Each correct answer presents a complete solution. Choose two.)
Aon: [push, pull_request]
Bon:
Con:
Don: [push, commit]
Eon:
✓ Verified Answer: AE
Question #11Part 1
You are a DevOps engineer working on custom Actions development. You need to handle the errors or exceptions as part of the JavaScript based action code. What should be added to the following code block to handle errors? const core = require('@actions/core'); try { // action code } catch (error) { > }
Acore.setException(error.message);
Baction.setError(error.message);
Ccore.setFailed(error.message);
Dcore.action.setException(error.message);
✓ Verified Answer: C
Question #12Part 1Select 2
What are two reasons to keep an action in its own repository instead of bundling it with other application code? (Each correct answer presents a complete solution. Choose two.)
AIt makes the action.yml file optional.
BIt makes it easier for the GitHub community to discover the action.
CIt widens the scope of the code base for developers fixing issues and extending the action.
DIt decouples the action’s versioning from the versioning of other application code.
EIt allows sharing workflow secrets with other users.
✓ Verified Answer: BD
Question #13Part 1
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?
APOST /repos/:owner/:repo/actions/runs/:run_id/logs
BGET /repos/:owner/:repo/actions/runs/:run_id/logs
CPOST /repos/:owner/:repo/actions/runs/:run_id
DGET /repos/:owner/:repo/actions/artifacts/logs
✓ Verified Answer: B
Question #14Part 1Select 2
Which workflow commands send information from the runner? (Each correct answer presents a complete solution. Choose two.)
Areading from environment variables
Bsetting a debug message
Cpopulating variables in a Dockerfile
Dsetting output parameters
✓ Verified Answer: BD
Question #15Part 1
As a developer, you are authoring a workflow that will deploy to both DevCloud and TestCloud resources. Each cloud resource is accessed with a different deployment key. Which approach best allows you to use the same reusable workflow in separate jobs to target the different cloud resources?
APopulate a DEPLOY_KEY repository secret with a JSON object containing DevCloud and TestCloud properties. Then specify DEPLOY_KEY.DevCloud in the secrets sections of the reusable workflow.
BUse a marketplace action to conditionally parse the DEPLOY_KEY repository secret based on the cloud resource name.
CStore the different keys in a DEPLOY_KEY environment secret in the DevCloud and TestCloud environments. Specify DEPLOY_KEY in the secrets section of the reusable workflow.
DCreate repository secrets named DevCloud.DEPLOY_KEY and TestCloud.DEPLOY_KEY so that the reusable workflow parses the secrets by resource name.
✓ Verified Answer: C
Question #16Part 1
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?
AInstall Redis on the hosted runner image and place it in a runner group. Specify label: in your job to target the runner group.
BSet up Redis on a separate machine and reference that instance from your job.
CSpecify container: and services: in your job definition to leverage a Redis service container.
DAdd a run step to your workflow, which dynamically installs and configures Redis as part of your job.
✓ Verified Answer: C
Question #17Part 1Select 2
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 presents a complete solution. Choose two.)
AUse self-hosted runners for all workflow runs.
BDelete artifacts from the repositories manually.
CConfigure the artifact and log retention period.
DDisable branch protections in the repository.
EConfigure the repo to use Git Large File Storage.
✓ Verified Answer: BC
Question #18Part 1
Which of the following is the most common way to target a specific major release version?
Asteps:
Bsteps:
Csteps:
Dsteps:
✓ Verified Answer: A
Question #19Part 1Select 2
GitHub-hosted runners support which capabilities? (Each correct answer presents a complete solution. Choose two.)
Asupport for Linux, Windows, and macOS
Bsupport for a variety of Linux variations including CentOS, Fedora, and Debian
Crequiring a payment mechanism (e.g., credit card) to use for private repositories
Dautomatic file-system caching between workflow runs
Eautomatic patching of both the runner and the underlying OS
✓ Verified Answer: AE
Question #20Part 1Select 2
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. Which steps should you perform to prepare the runner and your users to run these workflows? (Each correct answer presents part of the solution. Choose two.)
AConfigure the webhook and network to enable GitHub to trigger workflow.
BCreate the group custom-software-on-linux and move the runner into the group.
CInform users to identify the runner with the labels custom-software and linux.
DAdd the label linux to the runner.
EInform users to identify the runner based on the group.
✓ Verified Answer: BE
Question #21Part 1
While awaiting approval, how many days can a workflow be in the “Waiting” state before it automatically fails?
A30 days
B60 days
C14 days
D7 days
✓ Verified Answer: A
Question #22Part 1
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 to define the metadata file for your custom action?
Aruns:
Bruns:
Cruns:
Druns:
✓ Verified Answer: B
Question #23Part 1
An organization’s policies specify only local actions are allowed. How should actions be distributed for this organization?
Avia a repository owned by a third party
Bvia repositories owned by the organization
Cvia the GitHub Marketplace
Dvia the .github repository owned by the organization
✓ Verified Answer: D
Question #24Part 1
You need to trigger a workflow using the GitHub API for activity that happens outside of GitHub. Which workflow event do you use?
Aworkflow_run
Bdeployment
Ccheck_suite
Drepository_dispatch
✓ Verified Answer: D
Question #25Part 1
What is the proper syntax to reference the system-provided run number variable?
A${{var.GITHUB_RUN_NUMBER}}
B${{env.GITHUB_RUN_NUMBER}}
C$GITHUB_RUN_NUMBER
D${{GITHUB_RUN_NUMBER}}
E$github.run_number
✓ Verified Answer: C
Question #26Part 1
As a developer, how can you identify a JavaScript action on GitHub?
AThe action’s repository includes a js.yml file in the .github/workflows directory.
BThe action’s repository name includes the keyword “JavaScript.”
CThe action.yml metadata file has the runs.using value set to node16.
DThe action.yml metadata file references a package.json file.
✓ Verified Answer: C
Question #27Part 1
A single secret must be accessed by workflows in specific repositories. What is the best way to create the secret?
ACreate an environment secret at the organization level and leverage that environment in each of the specified repositories.
BCreate an organization secret, specify Selected repositories as the Repository access, and select the required repositories.
CCreate the secret in one of the repositories, check the Share secret option, and select the required repositories.
DStore the secret in a supported external key vault. Configure OpenID Connect (OIDC) to allow access to the external vault and link the secret from the external key vault in each of the specific repositories.
✓ Verified Answer: B
Question #28Part 1Select 3
In which locations can actions be referenced by workflows? (Each correct answer presents a complete solution. Choose three.)
Aan .action extension file in the repository
Ba published Docker container image on Docker Hub
Ca public NPM registry
Dthe runs-on: keyword of a workflow file
Ethe repository’s Secrets settings page
✓ Verified Answer: BFG
Question #29Part 1Select 2
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 solution. Choose two.)
AReference the mutex in the task performing the deployment.
BSet the concurrency in the deploymentjob to 1.
CSpecify a target environment in the deploymentjob.
DSpecify a concurrency scope in the workflow.
EConfigure the mutex setting in the environment.
✓ Verified Answer: CD
Question #30Part 1Select 2
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 cache action. Which input parameters are required for this action? (Each correct answer presents part of the solution. Choose two.)
Apath: the file path on the runner to cache or restore
Bdependency: the name and version of a package to cache or restore
Ckey: the key created when saving a cache and the key used to search for a cache
Drestore-keys: the copy action key used with cache parameter to cache the data
Ecache-hit: the copy action key used with restore parameter to restore the data from the cache
✓ Verified Answer: AC
Question #31Part 1Select 2
What are the most significant advantages of adding documentation while distributing custom actions? (Each answer presents a complete solution. Choose two.)
AIt generates auto completion when using the action in a workflow.
BIt shares the description of the action to the users.
CIt provides an example of the action.
DIt creates a readme.md for the consuming workflow.
✓ Verified Answer: BC
Question #32Part 1
Scheduled workflows run on the:
Aspecified commit and branch from the workflow YAML file.
Blatest commit from the branch named schedule.
Clatest commit and branch on which the workflow was triggered.
Dlatest commit from the branch named main.
Elatest commit on the default or base branch.
✓ Verified Answer: E
Question #33Part 1
Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?
AGITHUB_ACTOR
BGITHUB USER
CENV_ACTOR
DGITHUB_WORKFLOW_ACTOR
✓ Verified Answer: A
Question #34Part 1
As a developer, how can you identify a composite action on GitHub?
AThe action’s repository name includes the keyword “composite.”
BThe action’s repository includes an init.sh file in the root directory.
CThe action’s repository includes Dockerfile and package.json files.
DThe action.yml metadata file has the runs.using value set to composite.
✓ Verified Answer: D
Question #35Part 1Select 2
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 of the following steps would troubleshoot the issue? (Each answer presents a complete solution. Choose two.)
AReview the contents of the Runner_*.log files in the _diag folder.
BIncrease the usage limits for the GitHub-hosted runners.
CCheck the “Set up job” step for the logs of the last successful run to determine the runner.
DUpdate the org settings to enable GPU-based GitHub-hosted runners.
ERotate the GITHUB_TOKEN secret for the appropriate runners.
✓ Verified Answer: AC
Question #36Part 1Select 3
Custom environment variables can be defined at multiple levels within a workflow file including: (Each answer presents a complete solution. Choose three.)
Atop level.
Bstep level.
Cdefault level.
Drunner level.
Ejob level.
✓ Verified Answer: ABE
Question #37Part 1Select 2
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 following steps should you take? (Each correct answer presents part of the solution. Choose two.)
ANavigate to the organization settings and create a Production environment with the VMOps team as a required reviewer.
BSpecify the environment named Production in the workflow jobs that deploy to the VMs.
CNavigate to the repository settings and create a Production environment with the VMOps team as a required reviewer.
DAdd the VMs to the environment.
ESpecify the VMOps team as the owner of the environment.
✓ Verified Answer: BC
Question #38Part 1
What can be used to set a failed status of an action from its code?
AJavaScript dist/ folder
Bcomposite run step
Coutput variable
Da non-zero exit code
EDockerfile CMD
✓ Verified Answer: D
Question #39Part 1Select 3
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 organization? (Each correct answer presents a complete solution. Choose three.)
Aactions stored in an organizational partition in the GitHub Marketplace
Bcustom Docker actions stored in GitHub Container Registry
Cself-hosted runners
Dencrypted secrets
Eworkflow templates
✓ Verified Answer: CEF
Question #40Part 1
You are a DevOps engineer working on deployment workflows. You need to execute the deploy job only if the current branch name is feature-branch. Which code snippet will help you to implement the conditional execution of the job?
Ajobs:
Bjobs:
Cjobs:
Djobs:
✓ Verified Answer: A
Question #41Part 1
Which of the following is the lowest repository permission you need to have for downloading workflow artifacts?
ATriage
BAdmin
CMaintain
DWrite
ERead
✓ Verified Answer: E
Question #42Part 1Select 2
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 managed by different teams in different repos. To minimize management overhead and ensure the token is secure, which mechanisms should you use to store and access the token? (Each correct answer presents a complete solution. Choose two.)
AStore the token as a GitHub encrypted secret in the same repo as the code. During deployment, use GitHub Actions to store the secret in an environment variable that can be accessed at runtime.
BUse a corporate non-GitHub secret store (e.g., HashiCorp Vault) to store the token. During deployment, use GitHub Actions to store the secret in an environment variable that can be accessed at runtime.
CStore the token as an organizational-level encrypted secret in GitHub. During deployment, use GitHub Actions to store the secret in an environment variable that can be accessed at runtime.
DStore the token as a GitHub encrypted secret in the same repo as the code. Create a reusable custom GitHub Action to access the token by the microservice at runtime.
EStore the token in a configuration file in a private repository. Use GitHub Actions to deploy the configuration file to the runtime environment.
✓ Verified Answer: BC
More MICROSOFT Certification Practice Exams
Explore related MICROSOFT exam dumps and free practice question banks.
62-19313 Questions
Technology Literacy for Educators
70-2432 Questions
Administering and Deploying System Center 2012 Configuration Manager (SCCM)
70-33165 Questions
Core Solutions of Microsoft SharePoint Server 2013
70-3321 Questions
Advanced Solutions of Microsoft SharePoint Server 2013
70-3333 Questions
Deploying Enterprise Voice with Skype for Business 2015
70-3345 Questions
Core Solutions of Microsoft Skype for Business 2015
70-3396 Questions
Managing Microsoft SharePoint Server 2016
70-3411 Questions
Core Solutions of Microsoft Exchange Server 2013
70-34265 Questions
Advanced Solutions of Microsoft Exchange Server 2013
70-34553 Questions
Designing and Deploying Microsoft Exchange Server 2016
70-3466 Questions
Managing Office 365 Identities and Requirements
70-34765 Questions
Enabling Office 365 Services
📢 Unlock Full Access to Success!
"The content displayed here is a promotional preview and contains only 50% of the actual exam database. To access the complete set of updated questions, please upgrade to the Full Version."
👉 Click the button and follow the instructions to secure your full access immediately!