Summer Certification Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

GitHub Administrator GH-200 Book

Page: 7 / 8
Total 100 questions

GitHub Actions Exam Questions and Answers

Question 25

Which statement is true about using default environment variables?

Options:

A.

The environment variables can be read in workflows using the ENV: variable_name syntax.

B.

The environment variables created should be prefixed with GITHUB_ to ensure they can be accessed in workflows

C.

The environment variables can be set in the defaults: sections of the workflow

D.

The GITHUB_WORKSPACE environment variable should be used to access files from within the runner.

Question 26

What metadata file in a custom action defines the main entry point?

Options:

A.

action.js

B.

index.js

C.

action.yml

D.

main.yml

Question 27

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?

Options:

A.

runs-on: [self-hosted, linux-xlarge]

B.

runs-on: - self-hosted - ubuntu-latest

C.

runs-on: [self-hosted, runner1]

D.

runs-on: self-hosted

Question 28

As a DevOps engineer, you are developing workflows to build an application. You have a requirement to create the build targeting multiple node versions. Which code block should you use to define the workflow?

Options:

A.

jobs:

build-app:

strategy:

matrix:

node-ver: [10, 12, 14]

steps:

- uses: actions/setup-node@v3

with:

node-version: ${{ strategy.node-ver }}

B.

jobs:

build-app:

strategy:

matrix:

node-ver: [10, 12, 14]

steps:

- uses: actions/setup-node@v3

with:

node-version: ${{ matrix.node-ver }}

C.

jobs:

build-app:

matrix-strategy:

node-ver: [10, 12, 14]

steps:

- uses: actions/setup-node@v3

with:

node-version: ${{ matrix-strategy.node-ver }}

D.

jobs:

build-app:

matrix:

strategy:

node-ver: [10, 12, 14]

steps:

- uses: actions/setup-node@v3

with:

node-version: ${{ matrix.node-ver }}

Page: 7 / 8
Total 100 questions