Which of the following scenarios would require the use of self-hosted runners instead of GitHub-hosted runners?
You need to trigger a workflow using the GitHub API for activity that happens outside of GitHub. Which workflow event do you use?
Which step is using the dbserver environment variable correctly?
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 implement the conditional execution of the job?
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?
What is the right method to ensure users approve a workflow before the next step proceeds?
Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?
You need to use a specific version of an action. How should you use v1 of an actions/javascript-action repository in your workflow?
What is the minimal syntax for declaring an output named foo for an action?
A)
B)
C)
D)
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