GH-200 GitHub Actions Exam Questions and Answers
Where should workflow files be stored to be triggered by events in a repository?
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? (Choose two.)
As a developer, your self-hosted runner sometimes looses connection while running jobs. How should you troubleshoot the issue affecting your self-hosted runner?
As a developer, you want to review the step that caused a workflow failure and the failed step ' s build logs. First navigate to the main page of the repository on GitHub. Which section contains the step failure information?
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.
NOTE: Each correct answer is worth one point.
4 name: Node CI/CD
5
6
7
8 jobs:
9 build:
10 runs-on:
11 steps:
12 - uses: actions/checkout@v2
13 - uses: actions/setup-node@v1
14 with:
15 node-version: 12
16 - run: npm ci
17 - run: npm test
18
As a DevOps engineer, you are developing a composite action. You have a step that needs to be executed against a subdirectory. Which code snippet should you use within the composite action to specify the directory?
What is the minimal syntax for declaring an output named foo for an action?
A)
B)
C)
D)
What are the most significant advantages of adding documentation while distributing custom actions?
(Each answer presents a complete solution. Choose two.)
As a developer, you created a JavaScript action. What is the best way to test your JavaScript action?
Which workflow command would output the debug message " action successfully debugged " ?
While writing a custom action, some behavior within the runner must be changed. Which workflow commands would set an error message in the runner ' s output?
(Each correct answer presents a complete solution. Choose two.)
What is the right method to ensure users approve a workflow before the next step proceeds?
As a developer, what options should you recommend to implement standards for automation reuse? (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?
Custom environment variables can be defined at multiple levels within a workflow file, including which three levels?
(Each correct answer presents a complete solution. Choose three.)
As a developer, you need to create a custom action written in Python. Which action type should you choose?
As a developer, you need to create a custom action written in Python. Which action type should you choose?
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?
Which of the following is the proper syntax to specify a custom environment variable named MY_VARIABLE with the value my-value?
As a DevOps engineer, you need to execute a deployment to different environments such as development and testing based on labels added to a pull request. The deployment should use the releases branch and trigger only when there is a change in files under the apps folder. Which code block should be used to define the deployment workflow trigger?
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.)
As a DevOps engineer, you are trying to leverage an organization secret in a repo. The value received in the workflow is not the same as that set in the secret. What is the most likely reason for the difference?
You are a DevOps engineer in ABC Corp. You need to schedule your deployment workflow twice a week at 7:45 UTC every Wednesday and Saturday. What is the appropriate YAML structure?
Disabling a workflow allows you to stop a workflow from being triggered without having to delete the file from the repo. In which scenarios would temporarily disabling a workflow be most useful? (Choose two.)
What is the most secure way to store sensitive information in GitHub Actions workflows?
Which of the following is the lowest repository permission you need to have for downloading workflow artifacts?
Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?
As a developer, you have a 10-MB data set that is required in a specific workflow. Which steps should you perform so the dataset is stored encrypted and can be decrypted during the workflow? (Choose three.)
Which of the following statements are true regarding the use of GitHub Actions on a GitHub Enterprise Server instance? (Choose three.)