GitHub Actions Exam Questions and Answers
Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?
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?
In which scenarios could the GITHUB_TOKEN be used? (Choose two.)
How should you install the bats NPM package in your workflow?
A)
B)
C)
D)
Which default GitHub environment variable indicates the owner and repository name?
You need to trigger a workflow using the GitHub API for activity that happens outside of GitHub. Which workflow event do you use?
What menu options in a repository do you need to select in order to use a starter workflow that is provided by your organization?
You need to create new workflows to deploy to an unfamiliar cloud provider. What is the fastest and safest way to begin?
As a developer, you need to use GitHub Actions to deploy a microservice that requires runtime access to a secure token. This token is used by a variety of other microservices managed by different teams in different repos. To minimize management overhead and ensure the token is secure, which mechanisms should you use to store and access the token? (Choose two.)
Which of the following statements are true regarding the use of GitHub Actions on a GitHub Enterprise Server instance? (Choose three.)
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?
What is the right method to ensure users approve a workflow before the next step proceeds?
Which files are required for a Docker container action in addition to the source code? (Choose two.)
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?
How can GitHub Actions encrypted secrets be used in if: conditionals within a workflow job?
You need to make a script to retrieve workflow run logs via the API. Which is the correct API to download a workflow run log?
As a developer, which workflow steps should you perform to publish an image to the GitHub Container Registry? (Choose three.)
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?
Which run: command will set a step's output?
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.)
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.)