GitHub Actions Exam Questions and Answers
As a developer, how can you identify a JavaScript action on GitHub?
What will the output be for the following event trigger block in a workflow?

You need to create new workflows to deploy to an unfamiliar cloud provider. What is the fastest and safest way to begin?
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?
GitHub-hosted runners support which capabilities? (Choose two.)
When reviewing an action for use, what file defines its available inputs and outputs?
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?
Which files are required for a Docker container action in addition to the source code? (Choose two.)
What is the right method to ensure users approve a workflow before the next step proceeds?
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.)
What is the simplest action type to run a shell script?
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?
Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?
What are the two mandatory requirements for publishing GitHub Actions to the GitHub Marketplace? Each correct answer presents part of the solution.
NOTE: Each correct answer is worth one point.
You need to trigger a workflow using the GitHub API for activity that happens outside of GitHub. Which workflow event do you use?
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 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)

B)

C)
D)

Which of the following scenarios requires a developer to explicitly use the GITHUB_TOKEN or github.token secret within a workflow? (Choose two.)
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, what options should you recommend to implement standards for automation reuse? (Choose two.)
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?
As a DevOps engineer, you are developing a composite action. You have a step that needs to be executed against a subdirectory. Which code snippet should you use within the composite action to specify the directory?
Which workflow command would output the debug message " action successfully debugged " ?
When creating and managing custom actions in an enterprise setting, which of the following is considered a best practice?
What is the most secure way to store sensitive information in GitHub Actions workflows?
In the following workflow file, line 5 interprets lines 3 and 4 as Python. Which of the following is a valid option to complete line 5?
1 steps:
2 - run: |
3 import os
4 print(os.environ[ ' PATH ' ])
5
Which scopes are available to define custom environment variables within a workflow file? (Choose three.)
Which default environment variable specifies the branch or tag that triggered a workflow?
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.)
Which action type should be used to bundle a series of run steps into a reusable custom action?