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

Free Access Microsoft GH-200 New Release

Page: 6 / 10
Total 137 questions

GitHub Actions Exam Questions and Answers

Question 21

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?

Options:

A.

run: echo " ::set-env name=FOO::bar "

B.

run: echo " FOO=bar " > > $GITHUB_ENV

C.

run: echo ${{ $FOO=bar }}

D.

run: export FOO=bar

Question 22

Based on the YAML below, which two statements are correct? (Choose two.)

Options:

A.

This workflow will publish a package to an npm registry.

B.

This workflow will publish a package to GitHub Packages.

C.

This workflow file is using a matrix strategy.

D.

The workflow job publish-npm will only run after the build job passes.

Question 23

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?

Options:

A.

environment variables

B.

workflow commands

C.

self-hosted runners

D.

enable debug loggingE composite run step

Question 24

Which step is using the dbserver environment variable correctly?

Options:

A.

steps:

- name: Hello world

run: echo $dbserver

variables:

dbserver: orgserver1

B.

steps:

- name: Hello world

run: echo $dbserver

env:

dbserver: orgserver1

C.

steps:

- name: Hello world

run: echo $dbserver

env:

- name: dbserver

value: orgserver1

D.

steps:

- name: Hello world

run: echo $dbserver

environment:

dbserver: orgserver1

Page: 6 / 10
Total 137 questions