Aspecified commit and branch from the workflow YAML file.
Blatest commit from the branch named schedule.
Clatest commit and branch on which the workflow was triggered.
Dlatest commit from the branch named main.
Elatest commit on the default or base branch.
In which scenarios could the GITHUB_TOKEN be used? (Each correct answer presents a complete solution. Choose two.)
Ato create a repository secret
Bto add a member to an organization
Cto read from the file system on the runner
Dto publish to GitHub Packages
Eto create issues in the repo
Fto leverage a self-hosted runner
In which of the following scenarios should you use self-hosted runners? (Each correct answer presents a complete solution. Choose two.)
Awhen the workflow jobs must be run on Windows 10
Bwhen jobs must run for longer than 6 hours
Cwhen a workflow job needs to install software from the local network
Dwhen GitHub Actions minutes must be used for the workflow runs
Ewhen you want to use macOS runners
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? (Each correct answer presents part of the solution. Choose two.)
AConfigure the webhook and network to enable GitHub to trigger workflow.
BCreate the group custom-software-on-linux and move the runner into the group.
CInform users to identify the runner with the labels custom-software and linux.
DAdd the label linux to the runner.
EInform users to identify the runner based on the group.
FAdd the label custom-software to the runner.
Question 6
Author and maintain actions
0
Question 7
Author and manage workflows
Question 8
Author and manage workflows
Question 9
Author and manage workflows
Question 10
Secure and optimize automation
Question 11
Author and manage workflows
Question 12
Secure and optimize automation
Question 13
Author and manage workflows
Question 14
Secure and optimize automation
Question 15
Secure and optimize automation
Question 16
Author and manage workflows
Question 17
Author and maintain actions
Question 18
Author and manage workflows
Question 19
Consume and troubleshoot workflows
Question 20
Secure and optimize automation
Question 21
Author and manage workflows
Question 22
Secure and optimize automation
Question 23
Author and manage workflows
Question 24
Author and maintain actions
Question 25
Author and maintain actions
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ad
Want a break from the ads?
Become a Supporter and enjoy a completely ad-free experience, plus unlock Learn Mode, Exam Mode, AstroTutor AI, and more.
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
Ask AstroTutor
0
In which locations can actions be referenced by workflows? (Each correct answer presents a complete solution. Choose three.)
Aan .action extension file in the repository
Ba published Docker container image on Docker Hub
Ca public NPM registry
Dthe runs-on: keyword of a workflow file
Ethe repository’s Secrets settings page
Fa separate public repository
Which step is using the dbserver environment variable correctly?
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?
Acomposite run step
Benable debug logging
Cself-hosted runners
Denvironment variables
Eworkflow commands
How should you print a debug message in your workflow?
Aecho "::debug::Set variable myVariable to true"
Becho "Set variable MyVariable to true" >> $DEBUG_MESSAGE
Cecho "::add-mask::Set variable myVariable to true"
Decho "debug_message=Set variable myVariable to true" >> &GITHUB_OUTPUT
Which of the following is the proper syntax to specify a custom environment variable named MY_VARIABLE with the value my-value?
Avar:MY_VARIABLE = my-value
Benvironment:MY_VARIABLE = my-value
Cvar:MY_VARIABLE: my-value
Denv:MY_VARIABLE = my-value
Eenvironment:MY_VARIABLE: my-value
Fenv:MY_VARIABLE: my-value
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 to implement the conditional execution of the job?
As a developer, you need to leverage Redis in your workflow. What is the best way to use Redis on a self-hosted Linux runner without affecting future workflow runs?
AInstall Redis on the hosted runner image and place it in a runner group. Specify label: in your job to target the runner group.
BSet up Redis on a separate machine and reference that instance from your job.
CSpecify container: and services: in your job definition to leverage a Redis service container.
DAdd a run step to your workflow, which dynamically installs and configures Redis as part of your job.
As a DevOps engineer, you need to define a deployment workflow that runs after the build workflow has successfully completed. Without modifying the build workflow, which trigger should you define in the deployment workflow?
Arepository_dispatch
Bworkflow_dispatch
Cworkflow_exec
Dworkflow_run
When should you use the GITHUB_TOKEN in a workflow?
Awhen you want to make authenticated calls to the GitHub API
Bwhen you want to connect to the runner via SSH
Cwhen you want to access repository-level secrets
Dwhen you want to call an action from the marketplace
What is the smallest scope for an environment variable?
Athe workflow settings
Bthe workflow env mapping
Ca job
Da step
Custom environment variables can be defined at multiple levels within a workflow file including: (Each answer presents a complete solution. Choose three.)
Atop level.
Bstep level.
Cdefault level.
Drunner level.
Ejob level.
Fstage level.
What are the mandatory requirements for publishing GitHub Actions to the GitHub Marketplace? (Each correct answer presents part of the solution. Choose two.)
AThe action can be either in a public or private repository.
BThe action’s metadata file must be in the root directory of the repository.
CThe action’s name cannot match a user or organization on GitHub unless the user or organization owner is publishing the action.
DThe name should match with one of the existing GitHub Marketplace categories.
EEach repository can contain a collection of actions as long as they are under the same Marketplace category.
As a developer, which of the following snippets will enable you to run the commands npm ci and npm run build as part of a workflow?
A
run: |npm cinpm run build
B
shell:npm cinpm run build
C
run: |npm cinpm run buildshell: nodejs
D
run:npm cinpm run buildE.- shell: |npm cinpm run build
Which of the following is the lowest repository permission you need to have for downloading workflow artifacts?
ATriage
BAdmin
CMaintain
DWrite
ERead
You need to create new workflows to deploy to an unfamiliar cloud provider. What is the fastest and safest way to begin?
ACreate a custom action to wrap the cloud provider's CLI.
BSearch GitHub Marketplace for verified actions published by the cloud provider.
CUse the actions/jenkins-plugin action to utilize an existing Jenkins plugin for the cloud provider.
DSearch GitHub Marketplace for actions created by GitHub.
EDownload the CLI for the cloud provider and review the associated documentation.
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? (Each correct answer presents a complete solution. Choose two.)
AA runner needs to have diagnostic logging enabled.
BA workflow error produces too many, or wrong, requests, impacting external services negatively.
CA workflow is configured to run on self-hosted runners.
DA workflow sends requests to a service that is down.
EA workflow needs to be changed from running on a schedule to a manual trigger.
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? (Each correct answer presents a complete solution. Choose three.)
AActions can be published to an internal marketplace.
BGitHub-verified actions can be collectively enabled for use in the enterprise.
CSpecific actions can individually be enabled for the organization, including version information.
DActions can be restricted to only those available in the enterprise.
EIndividual third-party actions enabled with a specific tag will prevent updated versions of the action from introducing vulnerabilities.
FActions created by GitHub are automatically enabled and cannot be disabled.
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?
Aruns-on: [self-hosted, windows, x64]
Bself-hosted: [windows-x64]
Cruns-on: windows-latest
Dself-hosted: [windows, x64]
As a developer, you created a JavaScript action. What is the best way to test your JavaScript action?
ACreate a workflow that only executes your specific JavaScript action.
BPackage your JavaScript action inside a docker container image and run it.
CUse a tool called @vercel/ncc to compile your code.
DCreate a workflow that includes the actions/debug-javascript action.
What are two reasons to keep an action in its own repository instead of bundling it with other application code? (Each correct answer presents a complete solution. Choose two.)
AIt makes the action.yml file optional.
BIt makes it easier for the GitHub community to discover the action.
CIt widens the scope of the code base for developers fixing issues and extending the action.
DIt decouples the action’s versioning from the versioning of other application code.
EIt allows sharing workflow secrets with other users.