Microsoft GH-200 GitHub Actions Exam Exam Practice Test
GitHub Actions Exam Questions and Answers
Which of the following is the best way for an enterprise to prevent certain marketplace actions from running?
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.)
Which of the following scenarios would require the use of self-hosted runners instead of GitHub-hosted runners?
Which native method should you use to pass files between jobs within the same GitHub Actions workflow?
What is the simplest action type to run a shell script?
A development team has been using a Powershell script to compile and package their solution using existing tools on a Linux VM, which has been configured as a self-hosted runner. They would like to use the script as-is in an automated workflow. Which of the following should they do to invoke their script within a workflow step?
What is the right method to ensure users approve a workflow before the next step proceeds?
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?
Which of the following is a valid reusable workflow reference?
What are the two ways to pass data between jobs? (Choose two.)
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?
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.)
What is a valid scenario regarding environment secrets?
What menu options in a repository do you need to select in order to use a starter workflow that is provided by your organization?
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.)
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 correct answer presents a complete solution. Choose two.)
As a developer, how can you identify a Docker container action on GitHub?
You are a developer working on developing reusable workflows for your organization. What keyword should be included as part of the reusable workflow event triggers?
Which statement is true regarding the ability to delete a workflow run?
How can a workflow deployment mitigate the risk of multiple workflow runs deploying to a single cloud environment simultaneously?
(Each correct answer presents part of the solution. Choose two.)
GitHub-hosted runners support which capabilities? (Choose two.)
Which workflows can use an action stored in an internal repository when repository access is enabled for the organization or enterprise?
(Each correct answer presents a complete solution. Choose two.)
As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?
As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?
As a developer, you need to integrate a GitHub Actions workflow with a third-party code quality provider that uses the Checks API. How should you trigger a follow-up workflow?
Which action type should be used to bundle a series of run steps into a reusable custom action?
What are the most significant advantages of adding documentation while distributing custom actions?
(Each answer presents a complete solution. Choose two.)
You need to use a specific version of an action. How should you use v1 of an actions/javascript-action repository in your workflow?
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.environ[ ' PATH ' ])
5
Where should workflow files be stored to be triggered by events in a repository?
As a DevOps engineer, you are developing a container action. You need to execute a cleanup script after completing the main script execution. Which code block should be used to define the cleanup script?
When should you use the GITHUB_TOKEN in a workflow?
What are the advantages of using a matrix strategy in a job definition? (Choose two.)
Which of the following commands will set the $FOO environment variable within a script, so that it may be used in subsequent workflow job steps?
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?
Which default environment variable specifies the branch or tag that triggered a workflow?
Based on the YAML below, which two statements are correct? (Choose two.)
As a developer, which of the following snippets will enable you to run the commands npm ci and npm run build as part of a workflow?
Which of the following statements are true regarding the use of GitHub Actions on a GitHub Enterprise Server instance? (Choose three.)
How many jobs will result from the following matrix configuration?
Which of the following is the most common way to target a specific major release version?
As a developer, you are using a Docker container action in your workflow. What is required for the action to run successfully?