What are the two most significant advantages of adding documentation while distributing custom actions? Each correct answer presents a complete solution.
NOTE: Each correct answer is worth one point.
Answer : B, C
Documentation is critical when distributing custom GitHub Actions because users need to understand what the action does and how to use it correctly. A good README or marketplace description explains the action's purpose, required inputs, outputs, permissions, and expected behavior. This directly supports option B. Documentation should also include practical usage examples, such as a workflow snippet showing the uses: syntax and required with: inputs, which supports option C. Option A is incorrect because documentation does not create a README inside the consuming workflow; the action author provides documentation in the action repository. Option D is also incorrect because documentation does not automatically generate workflow auto-completion. This topic tests custom action publishing and usability best practices.
================
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?
Answer : B
The best approach is to use a service container for Redis. Service containers provide temporary supporting services for a workflow job, such as databases, caches, and message brokers, without permanently changing the runner. This is exactly what is needed when Redis is required only during workflow execution and should not affect future jobs on the self-hosted Linux runner. Option A installs Redis directly during the job and can introduce dependency, cleanup, and configuration risk. Option C requires separate infrastructure, which is unnecessary. Option D is incorrect because installing Redis into the runner image makes the runner stateful and harder to maintain. GitHub Actions workflow syntax supports jobs.<job_id>.services for service containers.
You need to trigger a workflow using the GitHub API for activity that happens outside of GitHub. Which workflow event do you use?
Answer : D
The repository_dispatch event allows you to trigger a workflow in response to external activity. It is commonly used when you need to trigger a workflow from outside GitHub, such as from another system or service, by sending a request to the GitHub API. This event provides flexibility to integrate with various external systems and trigger workflows in a GitHub repository.
As a developer, you are authoring a workflow that will deploy to both DevCloud and TestCloud resources. Each cloud resource is accessed with a different deployment key. Which approach best allows you to use the same reusable workflow in separate jobs to target the different cloud resources?
Answer : B
The best design is to use environment-scoped secrets with the same secret name, such as DEPLOY_KEY, in separate environments such as DevCloud and TestCloud. This lets the same reusable deployment logic reference one consistent secret name while the selected environment supplies the correct value. Option A is invalid because GitHub secret names should not be designed around dotted property access, and reusable workflows should not parse secret names dynamically. Option C introduces unnecessary marketplace dependency and weak secret handling. Option D is also wrong because GitHub secrets are opaque strings; ${{ secrets.DEPLOY_KEY.DevCloud }} is not valid secret property access. Reusable workflows can define and receive named secrets through the secrets mapping.
Your organization has a secret that must be available to all the repositories within GitHub Actions workflows.
You need to store the secret. The solution must minimize administrative effort.
What should you do in GitHub?
Answer : D
The correct solution is to create an organization-level Actions secret. This minimizes administrative effort because the secret can be managed once at the organization level and made available to all repositories or selected repositories through an access policy. Option D gives the correct navigation path: organization page, Settings, Secrets and variables, then Actions. Option A would require duplicating the secret in every repository, increasing maintenance overhead and risk of inconsistent values. Option B is wrong because personal developer settings do not centrally expose a secret to all organization repositories. Option C is incomplete because the current GitHub path places Actions secrets under ''Secrets and variables,'' not just a generic ''Security > Secrets'' location. GitHub documents organization secrets and the repository access policy model for sharing them.
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.
Answer : B, D
For GitHub Marketplace publishing, the action must meet Marketplace metadata and naming requirements. Option D is correct because the repository must contain a single action metadata file, action.yml or action.yaml, at the repository root for Marketplace listing. Option B is also correct because the action name must be unique and cannot match a GitHub user or organization unless that owner is publishing the action. Option A is false because Marketplace actions must be in public repositories. Option C is incorrect because a repository is expected to contain one marketplace-listed metadata file at the root, not a collection of marketplace actions. Option E is wrong because the name must not match an existing Marketplace category. GitHub documents these Marketplace prerequisites directly.
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?
Answer : B
To prevent reaching the storage limit for GitHub artifacts and packages, you should manage and clean up artifacts and packages stored in repositories owned by your organization. This includes deleting unnecessary artifacts and managing the lifecycle of packages, as they contribute directly to your organization's storage quota.