GitHub Actions v0.3
GitHub Actions v0.3
Which of the following statements are true regarding the use of GitHub Actions
on a GitHub Enterprise Server instance? (Choose three.)
A. Use of GitHub Actions on GitHub Enterprise Server requires a persistent internet
connection
B. Actions created by GitHub are automatically available and cannot be disabled
C. Most GitHub authored actions are automatically bundled for use on GitHub
Enterprise Server
D. Third party actions can be used on GitHub Enterprise Server by configuring
GitHub Connect
E. Actions must be defined in the .github repository
F. Third party actions can be manually synchronized for use on GitHub Enterprise
Server
Question #2
Which workflow commands send information from the runner? (Choose two.)
A. reading from environment variables
B. setting a debug message
C. populating variables in a Dockerfile
D. setting output parameters
Setting a debug message using ::debug:: command sends a message to the logs,
helping with troubleshooting and providing insight into the workflow run.
Setting output parameters using ::set-output sends data from a job step to subsequent
steps or jobs, which can be used later in the workflow.
Question #3
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?
A. There is a different value specified at the repo level.
B. There is a different value specified at the workflow level.
C. The Codespace secret doesn't match the expected value.
D. The Encrypt Secret setting was not configured for the secret.
E. There is a different value specified at the enterprise level.
Correct Answer: A
GitHub secrets are defined at different levels: organization, repository, and sometimes
at the workflow level.
If a secret is defined at both the organization level and the repository level, the
repository-level secret will take precedence. So, if the value of the secret differs
between these levels, the workflow will use the value from the repository level instead
of the organization level.
Question #4*
Your organization is managing secrets using GitHub encrypted secrets,
including a secret named SuperSecret.
As a developer, you need to create a version of that secret that contains a
different value for use in a workflow that is scoped to a specific repository
named MyRepo. How should you store the secret to access your specific version
within your workflow?
A. Create a duplicate entry for SuperSecret in the encrypted secret store and specify
MyRepo as the scope.
B. Create MyRepo_SuperSecret in GitHub encrypted secrets to specify the scope to
MyRepo.
C. Create a file with the SuperSecret. information in the .qithub/secrets folder in
MyRepo.
D. Create and access SuperSecret from the secrets store in MyRepo.
Correct Answer: B (D)
To scope a secret to a specific repository, you can create a new secret with a name
like MyRepo_SuperSecret in the secrets section of the MyReporepository's settings.
This ensures that the secret is specific to that repository and can be used within its
workflows.
Question #5
Which files are required for a Docker container action in addition to the source
code? (Choose two.)
A. Dockerfile
B. Actionfile
C. metadata.yml
D. action.yml
Question #6
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?
A. Configure a self-hosted runner on Windows with the requested tools.
B. Use the YAML powershell: step.
C. Run the pwsh2bash command to convert the script so it can be run on Linux.
D. Use the YAML shell: pwsh in a run step.
E. Use the actions/run-powershell action to invoke the script.
Correct Answer: DxxxSince the self-hosted runner is configured on a Linux VM and
the script is written in PowerShell, you can invoke the script using the pwsh
(PowerShell Core) shell in a run step in the workflow. This ensures that the script runs
as-is on the Linux runner, as PowerShell Core (pwsh) is cross-platform and supports
Linux.
Question #7
Which workflow command would output the debug message "action successfully
debugged"?
A. echo :debug::message=action successfully debugged"
B. echo "debug-action successfully debugged"
C. echo "::debug::action successfully debugged"
D. echo ":debug:action successfully debugged:"
Correct Answer: C
The ::debug:: syntax is used to output debug messages in GitHub Actions workflows.
This command will print the message "action successfully debugged" in the debug
logs when the workflow runs.
Question #8
As a developer, you are optimizing a GitHub workflow that uses and produces
many different files. You need to determine when to use caching versus workflow
artifacts. Which two statements are true? (Choose two.)
A. Use caching when reusing files that change rarely between jobs or workflow runs.
B. Use artifacts when referencing files produced by a job after a workflow has ended.
C. Use caching to store cache entries for up to 30 days between accesses.
D. Use artifacts to access the GitHub Package Registry and download a package for a
workflow
Caching is ideal for files that change rarely, such as dependencies or build outputs, as
it speeds up subsequent workflow runs by reusing previously cached files instead of
re-downloading or rebuilding them.
Artifacts are used for persisting files produced during a job that need to be used in
later jobs or after the workflow has ended, allowing them to be downloaded or
referenced later.
Question #9
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?
A. Add the workflow_run webhook event as a trigger for the workflow for the code
quality integration name
B. Add the check_run webhook event as a trigger for the workflow when the code
quality integration is completed
C. Add the pull_request webhook event as a trigger for the workflow when the code
quality integration is synchronized
D. Add the deployment webhook event as a trigger for the workflow when the code
quality integration is completed
Correct Answer: B
The check_run event is triggered when a check (such as a code quality check)
completes, including when the status of a check changes. By adding this event as a
trigger, you can initiate a follow-up workflow when the code quality integration
finishes its checks.
Question #10*
As a developer, which workflow steps should you perform to publish an image to
the GitHub Container Registry? (Choose three.)
A. Use the actions/setup-docker action
B. Authenticate to the GitHub Container Registry.
C. Build the container image.
D. Push the image to the GitHub Container Registry
E. Pull the image from the GitHub Container Registry.
Correct Answer: C
Question #12
Which syntax correctly accesses a job output (output1) of an upstream job (job1)
from a dependent job within a workflow?
A. ${{needs.job1.outputs.output1}}
B. ${{needs.job1.output1}}
C. ${{depends.job1.output1}}
D. ${{job1.outputs.output1}}
Correct Answer: A
Theneedscontext is used to reference the outputs of jobs that are dependencies of the
current job. In this case, needs.job1.outputs.output1correctly accesses the output
ofoutput1from the jobjob1in the dependent job.
Question #13
Where should workflow files be stored to be triggered by events in a repository?
A. .github/workflows/
B. .github/actions/
C. Nowhere; they must be attached to an act on in the GitHub user interface
D. anywhere
E. .workflows/
Correct Answer: A
Question #14**
How should you install the bats NPM package in your workflow?
A.
jobs :
example-job:
steps:
- npm install -g bats
B.
jobs :
steps:
- run: npm install -g bats
C.
jobs :
runs-on: ubuntu-latest
- run: npm install -g bats
D.
jobs :
example-job:
runs-on: ubuntu-latest
steps:
- run: npm install -g bats
Correct Answer: D
The correct syntax includes specifying the job (example-job), the runner (ubuntu-
latest), and the necessary step (npm install -g bats) within the workflow. This ensures
that the package is installed properly during the execution of the job.
Question #15*#
Which scopes are available to define custom environment variables within a
workflow file? (Choose three.)
A. the entire workflow, by using env at the top level of the workflow file
B. all jobs being run on a single Actions runner, by using runner.env at the top of the
workflow file
C. the entire stage, by using env at the top of the defined build stage
D. within the run attribute of a job step
E. the contents of a job within a workflow, by using jobs.<job_id>.env
F. a specific step within a job, by using jobs.<job_id>.steps[*].env
You can define environment variables for the entire workflow by using the env key at
the top level of the workflow file. These environment variables will be available to all
jobs and steps within the workflow.
Environment variables can also be set within the run attribute of a job step, and these
variables will be scoped only to that specific step.
You can set environment variables for specific steps within a job by using
jobs.<job_id>.steps[*].env, which allows you to define variables that will only be
available to that step.
Question #16
Which default GitHub environment variable indicates the name of the person or
app that initiated a workflow?
A. ENV_ACTOR
B. GITHUB_WORKFLOW_ACTOR
C. GITHUB_ACTOR
D. GITHUB_USER
Correct Answer: C
The GITHUB_ACTOR environment variable indicates the name of the person or app
that initiated the workflow. This variable is automatically provided by GitHub in the
workflow and can be used to identify the user or application triggering the workflow.
Question #17
When reviewing an action for use, what file defines its available inputs and
outputs?
A. inputs.yml
B. config.json
C. defaults.json
D. workflow.yml
E. action.yml
Correct Answer: E
The action.yml file defines the inputs and outputs for a GitHub Action. This file
contains metadata about the action, including the required inputs and outputs, as well
as other configurations like the action's description, runs, and environment setup.
Question #18
As a developer, you are using a Docker container action in your workflow. What
is required for the action to run successfully?
A. The job env must be set to a Linux environment.
B. The job runs-on must specify a Linux machine with Docker installed.
C. The referenced action must be hosted on Docker Hub.
D. The action must be published to the GitHub Marketplace.
Correct Answer: B
For a Docker container action to run in a GitHub Actions workflow, the runner must
have Docker installed.
The runs-on attribute of the job should specify an environment that supports Docker,
typically a Linux environment (e.g., ubuntu-latest), since Docker is widely supported
and commonly used in Linux-based environments.
Question #19
You need to create new workflows to deploy to an unfamiliar cloud provider.
What is the fastest and safest way to begin?
A. Create a custom action to wrap the cloud provider's CLI.
B. Search GitHub Marketplace for verified actions published by the cloud provider.
C. Use the actions/jenkins-plugin action to utilize an existing Jenkins plugin for the
cloud provider.
D. Search GitHub Marketplace for actions created by GitHub.
E. Download the CLI for the cloud provider and review the associated documentation.
Correct Answer: B
Searching the GitHub Marketplace for verified actions published by the cloud
provider is the quickest and safest approach. Many cloud providers offer verified
GitHub Actions that are maintained and optimized to interact with their services.
These actions typically come with the correct configurations and best practices,
allowing you to get started quickly without reinventing the wheel.
Question #20
As a developer, what options should you recommend to implement standards for
automation reuse? (Choose two.)
A. Create workflow templates and store them in the organization's .github repository.
B. Create reusable actions and workflows that can be called from other workflows.
C. Create a marketplace partition to publish reusable automation for the company.
D. Store shared corporate actions in subfolders in a defined and documented
internally accessible repository.
Question #21
What is the right method to ensure users approve a workflow before the next
step proceeds?
A. creating a branch protection rule and only allow certain users access
B. granting users workflow approval permissions
C. adding users as required reviewers for an environment
D. granting users repository approval permissions
Correct Answer: C
GitHub Actions allows you to configure environment protection rules, where you can
require specific users or teams to approve the deployment before the workflow
proceeds to the next step. This ensures that the required reviewers approve the
workflow before any sensitive actions (such as deployment) occur.
Question #23
In which locations can actions be referenced by workflows? (Choose three.)
A. a separate public repository
B. an .action extension file in the repository
C. the same repository as the workflow
D. a published Docker container image on Docker Hub
E. the runs-on: keyword of a workflow file
F. the repository's Secrets settings page
G. a public NPM registry
Question #24
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.)
A. A workflow sends requests to a service that is down.
B. A workflow error produces too many, or wrong, requests, impacting external
services negatively.
C. A workflow is configured to run on self-hosted runners
D. A workflow needs to be changed from running on a schedule to a manual trigger
E. A runner needs to have diagnostic logging enabled.
Question #25
Which of the following scenarios requires a developer to explicitly use the
GITHUB_TOKEN or github.token secret within a workflow? (Choose two.)
A. passing the GITHUB_TOKEN secret to an action that requires a token as an input
B. making an authenticated GitHub API request
C. checking out source code with the actions/checkout@v3 action
D. assigning non-default permissions to the GITHUB_TOKEN
Question #26***
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.)
A. Create the group custom-software-on-linux and move the runner into the group.
B. Inform users to identify the runner based on the group.
C. Add the label custom-software to the runner.
D. Configure the webhook and network to enable GitHub to trigger workflow.
E. Add the label linux to the runner.
Once the runner is properly configured and labeled, users should be informed to select
the specific runner by identifying the label or group name when defining the runner in
their workflows.
Adding a custom label (like custom-software) to the runner makes it easier for users
to select the runner in their workflows by using the runs-on key, which allows them to
choose this specific runner based on its label.
Question #27
Which workflow event is used to manually trigger a workflow run?
A. create
B. workflow_dispatch
C. workflow_run
D. status
Correct Answer: B
Correct Answer: C
The action.yml file is the metadata file in a custom GitHub Action that defines the
main entry point, including information such as the inputs, outputs, description, and
the runs key that specifies the main entry point (e.g., a script or a Docker container).
Question #29*
Which default GitHub environment variable indicates the owner and repository
name?
A. REPOSITORY NAME
B. GITHUB REPOSITORY
C. ENV REPOSITORY
D. GITHUB WORKFLOW REPO
Question #30
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?
A. check_run
B. workflow_run
C. workflow_call
D. pull_request
Correct Answer: C
Question #31
Based on the YAML below, which two statements are correct? (Choose two.)
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN } }
Question #32
In which scenarios could the GITHUB_TOKEN be used? (Choose two.)
A. to leverage a self-hosted runner
B. to create a repository secret
C. to publish to GitHub Packages
D. to create issues in the repo
E. to read from the file system on the runner
F. to add a member to an organization
Question #33*
How many jobs will result from the following matrix configuration?
strategy:
matrix:
color: [green, pink]
animal: [owl, magpie]
include:
- color: blue
animal: owl
- color: pink
animal: magpie
A. 3 jobs
B. 4 jobs
C. 5 jobs
D. 6 jobs
The matrix configuration specifies two variables: color and animal. The color variable
has 2 values (green and pink), and the animal variable has 2 values (owl and magpie).
This would result in 4 combinations (2 color values × 2 animal values). Additionally,
the include section introduces two more combinations (color: blue and animal: owl;
color: pink and animal: magpie).
Question #34*#
Which of the following scenarios would require the use of self-hosted runners
instead of GitHub-hosted runners?
A. running more than the three concurrent workflows supported by GitHub-hosted
runners
B. exceeding 50,000 monthly minutes of build time
C. using Docker containers as part of the workflow
D. using specialized hardware configurations required for workflows
E. performing builds on macOS
Question #35
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?
A. self-hosted: [windows-x64]
B. runs-on: [self-hosted, windows, x64]
C. runs-on: windows-latest
D. self-hosted: [windows, x64]
Correct Answer: B
The runs-on keyword allows you to specify the operating system and other labels for
the runner. By specifying self-hosted, windows, and x64, you are targeting a self-
hosted Windows runner that matches these criteria, which aligns with the custom
configuration of your self-hosted runner.
Question #36
As a developer, how can you identify a Docker container action on GitHub?
A. The action's repository includes @actions/core in the root directory.
B. The action's repository name includes the keyword "Docker."
C. The action.yml metadata file references a Dockerfile file.
D. The action.yml metadata file has the runs.using value set to Docker.
Correct Answer: D
In a Docker container action, the action.ymlfile includes the runs.using field, which is
set to docker to specify that the action runs inside a Docker container. This is the key
indicator that the action is a Docker container action.
Question #37
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?
A. Insights
B. Code
C. Actions
D. Pull requests
E. Issues
Correct Answer: C
The Actions tab on the main page of the repository is where you can find detailed
information about the workflow runs, including step failures and build logs. You can
review the status of each job and step within the workflow, see the failure messages,
and access logs for debugging.
Question #38
What are the two ways to pass data between jobs? (Choose two.)
A. Use the copy action with restore parameter to restore the data from the cache
B. Use the copy action to save the data that should be passed in the artifacts folder.
C. Use the copy action with cache parameter to cache the data
D. Use data storage.
E. Use job outputs
F. Use artifact storage.
Job outputs are used to pass data from one job to another in a workflow. A job can
produce output values (like variables or files), which can be referenced by subsequent
jobs using theneedskeyword and${{ steps.step_id.
outputs.output_name }}syntax.
Artifact storage allows data (such as files or results) to be saved by a job and then
retrieved by another job in a later step. This is commonly used for passing large
amounts of data or files between jobs.
Question #39
Without the need to use additional infrastructure, what is the simplest and most
maintainable method for configuring a workflow job to provide access to an
empty PostgreSQL database?
A. Use service containers with a Postgres database from Docker hub.
B. Run the actions/postgres action in a parallel job.
C. It is currently impossible to access the database with GitHub Actions.
D. Dynamically provision and deprovision an environment.
Correct Answer: A
GitHub Actions supports the use of service containers, which allows you to spin up a
PostgreSQL database (or any other service) in a Docker container during your
workflow. You can pull a PostgreSQL image from Docker Hub, and the container
will automatically be available to your workflow job. This method requires no
additional infrastructure and is easy to configure and maintain, as you simply define
the container in the workflow file.
Question #40
Which default environment variable specifies the branch or tag that triggered a
workflow?
A. GITHUB_TAG
B. GITHUB_REF
C. ENV_BRANCH
D. GITHUB_BRANCH
Correct Answer: B
The GITHUB_REF environment variable specifies the branch or tag that triggered the
workflow. It contains the full reference to the branch or tag, such as refs/heads/main
for a branch or refs/tags/v1.0 for a tag.
Question #41
As a developer, what is the safest way to reference an action to prevent
modification of the underlying code?
A. Use a commit hash.
B. Use a branch name.
C. Use a patch release tag.
D. Use a major release tag.
Correct Answer: A
Using a commit hash is the safest method because it references a specific point in
time in the repository's history. This ensures that the action is locked to that exact
version and will not be affected by any future changes or modifications to the
codebase. Even if the action is updated later, your workflow will continue using the
specific commit you referenced.
Question #42
How can GitHub Actions encrypted secrets be used in if: conditionals within a
workflow job?
A. Set the encrypted secret as a job-level environment variable and then reference the
environment variable within the conditional statement.
B. Create a job dependency that exposes the encrypted secret as a job output, which
can then be leveraged in a subsequent dependent job.
C. Use the secrets context within the conditional statement, e.g. $
{{ secrets.MySuperSecret }}.
D. Use a workflow command to expose the encrypted secret via a step's output
parameter and then use the step output in the job's if: conditional.
Question #43
What is the smallest scope for an environment variable?
A. the workflow settings
B. a step
C. a job
D. the workflow env mapping
Correct Answer: B
Question #44
What are the advantages of using a matrix strategy in a job definition? (Choose
two.)
A. It can test code in multiple versions of a programming language.
B. It can decrease the costs for running multiple combinations of programming
language/operating systems.
C. It can run up to 512 jobs per workflow run.
D. It can test code in multiple operating systems.
Question #45*
GitHub-hosted runners support which capabilities? (Choose two.)
A. automatic patching of both the runner and the underlying OS
B. automatic file-system caching between workflow runs
C. support for Linux, Windows, and mac
D. support for a variety of Linux variations including CentOS, Fedora, and Debian
E. requiring a payment mechanism (e.g., credit card) to use for private repositories
QUESTION NO: 1
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.)
A. Encrypt the dataset.
QUESTION NO: 2
What are the advantages of using a matrix strategy in a job
definition? (Choose two.)
QUESTION NO: 3
You need to trigger a workflow using the GitHub API for
activity that happens outside of GitHub. Which workflow
event do you use?
A. check_suite
B. workflow_run
C. deployment
D. repository_dispatch
Correct Answer: D
QUESTION NO: 4
Which of the following scenarios would require the use of
self-hosted runners instead of GitHub-hosted runners?
QUESTION NO: 5
As a developer, you want to run a workflow from the Actions
tab in GitHub. Which YAML snippet should you use to match
the interface in this image?
A.
on :
workflow_dispatch:
inputs :
test_suite:
- functional
- regression
B.
on :
Workflow_run:
inputs :
test_suite:
- functional
- regression
C.
on :
workflow_dispatch:
inputs :
test_suite:
value: functional
options :
- regression
D.
on :
Workflow_run:
inputs :
test_suite:
- functional
- regression
Correct Answer: C
The first image shows a workflow trigger with an option for the test
suite, and the chosen YAML configuration matches this interface.
Specifically, the test suite input is defined withtype: choiceand
includes the optionvalue: functional, which aligns with the visible UI
elements in the first image.
QUESTION NO: 6
As a developer, you are optimizing a GitHub workflow that
uses and produces many different files. You need to
determine when to use caching versus workflow artifacts.
Which two statements are true? (Choose two.)
QUESTION NO: 8
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?
D. The Encrypt Secret setting was not configured for the secret.
Correct Answer: A
GitHub secrets are defined at different levels: organization,
repository, and sometimes at the workflow level.
If a secret is defined at both the organization level and the
repository level, the repository-level secret will take precedence. So,
if the value of the secret differs between these levels, the workflow
will use the value from the repository level instead of the
organization level.
QUESTION NO: 9
As a developer, your Actions workflow often reuses the same
outputs or downloaded dependencies from one run to
another. To cache dependencies for a job, you are using the
GitHub cache action. Which input parameters are required
for this action? (Choose two.)
B. key: the key created when saving a cache and the key used to
search for a cache
E. ref: the ref name of the branch to access and restore a cache
created
QUESTION NO: 10
What metadata file in a custom action defines the main
entry point?
A. action.js
B. index.js
C. action.yml
D. main.yml
Correct Answer: C
QUESTION NO: 11
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?
A.
B.
C.
D.
Correct Answer: A
The correct syntax for specifying a cleanup script to be run after the
main entry point is executed in a Docker- based GitHub Action is to
use thepostkey. This ensures thatcleanup.shruns after the main
script (main.sh) has completed.
QUESTION NO: 12
Which files are required for a Docker container action in
addition to the source code? (Choose two.)
A. Dockerfile
B. Actionfile
C. metadata.yml
D. action.yml
QUESTION NO: 13
In which locations can actions be referenced by workflows?
(Choose three.)
QUESTION NO: 14
Based on the YAML below, which two statements are
correct? (Choose two.)
QUESTION NO: 15
Which default GitHub environment variable indicates the
owner and repository name?
A. REPOSITORY NAME
B. GITHUB REPOSITORY
C. ENV REPOSITORY
Correct Answer: A
QUESTION NO: 16
Which syntax correctly accesses a job output (output1) of an
upstream job (job1) from a dependent job within a
workflow?
A. ${{needs.job1.outputs.output1}}
B. ${{needs.job1.output1}}
C. ${{depends.job1.output1}}
D. ${{job1.outputs.output1}}
Correct Answer: A
QUESTION NO: 17
What are the two ways to pass data between jobs? (Choose
two.)
A. Use the copy action with restore parameter to restore the data
from the cache
B. Use the copy action to save the data that should be passed in the
artifacts folder.
C. Use the copy action with cache parameter to cache the data
Job outputs are used to pass data from one job to another in a
workflow. A job can produce output values (like variables or files),
which can be referenced by subsequent jobs using theneedskeyword
and${{ steps.step_id.
outputs.output_name }}syntax.
Artifact storage allows data (such as files or results) to be saved by
a job and then retrieved by another job in a later step. This is
commonly used for passing large amounts of data or files between
jobs.
QUESTION NO: 18
What is the right method to ensure users approve a
workflow before the next step proceeds?
Correct Answer: C
QUESTION NO: 19
As a developer, how can you identify a Docker container
action on GitHub?
Correct Answer: D
QUESTION NO: 20
Which workflow command would output the debug message
"action successfully debugged"?
Correct Answer: C
QUESTION NO: 21
As a developer, you need to make sure that only actions
from trusted sources are available for use in your GitHub
Enterprise Cloud organization. Which of the following
statements are true? (Choose three.)
QUESTION NO: 22
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.)
QUESTION NO: 23
You are reaching your organization's storage limit for GitHub
artifacts and packages. What should you do to prevent the
storage limit from being reached? (Choose two.)
QUESTION NO: 24
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?
A. Insights
B. Code
C. Actions
D. Pull requests
E. Issues
Correct Answer: C
The Actions tab on the main page of the repository is where you can
find detailed information about the workflow runs, including step
failures and build logs. You can review the status of each job and
step within the workflow, see the failure messages, and access logs
for debugging.
QUESTION NO: 25
Which action type should be used to bundle a series of run
steps into a reusable custom action?
A. Composite action
D. JavaScript action
Correct Answer: A
QUESTION NO: 26
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?
Correct Answer: B
QUESTION NO: 27
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?
Correct Answer: D
QUESTION NO: 28
Which run: command will set a step's output?
Correct Answer: A
QUESTION NO: 29
What will the output be for the following event trigger block
in a workflow?
Correct Answer: C
QUESTION NO: 30
Without the need to use additional infrastructure, what is
the simplest and most maintainable method for configuring
a workflow job to provide access to an empty PostgreSQL
database?
Correct Answer: A
QUESTION NO: 31
What is the right method to ensure users approve a
workflow before the next step proceeds?
Correct Answer: B
QUESTION NO: 32
You are a developer, and your container jobs are failing on a
self-hosted runner. Which requirements must you check to
ensure that the self-hosted runner is properly configured?
(Choose two.)
QUESTION NO: 33
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?
A. JavaScript action
C. Python action
Correct Answer: D
QUESTION NO: 35
Which of the following scenarios requires a developer to
explicitly use the GITHUB_TOKEN or github.token secret
within a workflow? (Choose two.)
QUESTION NO: 36
How can GitHub Actions encrypted secrets be used in if:
conditionals within a workflow job?
Correct Answer: C
GitHub Actions encrypted secrets can be accessed in workflows
using thesecretscontext. You can directly reference the secret within
anif:conditional using${{ secrets.MySuperSecret }}to determine
whether a job or step should run based on the secret's value.
QUESTION NO: 37
Your organization is managing secrets using GitHub
encrypted secrets, including a secret named SuperSecret.
As a developer, you need to create a version of that secret
that contains a different value for use in a workflow that is
scoped to a specific repository named MyRepo. How should
you store the secret to access your specific version within
your workflow?
Correct Answer: B
QUESTION NO: 38
Which default GitHub environment variable indicates the
name of the person or app that initiated a workflow?
A. ENV_ACTOR
B. GITHUB_WORKFLOW_ACTOR
C. GITHUB_ACTOR
D. GITHUB_USER
Correct Answer: C
QUESTION NO: 39
How many jobs will result from the following matrix
configuration?
A. 3 jobs
B. 4 jobs
C. 5 jobs
D. 6 jobs
Correct Answer: D
QUESTION NO: 40
What can be used to set a failed status of an action from its
code?
A. @actions/github toolkit
C. Dockerfile CMD
E. output variable
Correct Answer: D
QUESTION NO: 41
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?
Correct Answer: C
QUESTION NO: 42
As a developer, you are optimizing a GitHub workflow that
uses and produces many different files. You need to
determine when to use caching versus workflow artifacts.
Which two statements are true? (Choose two.)
QUESTION NO: 43
How should you install the bats NPM package in your
workflow?
A.
B.
C.
D.
Correct Answer: D
QUESTION NO: 44
As a developer, what options should you recommend to
implement standards for automation reuse? (Choose two.)
QUESTION NO: 45
What menu options in a repository do you need to select in
order to use a starter workflow that is provided by your
organization?
Correct Answer: D