Free GitHub-Actions Exam Braindumps (page: 3)

Page 3 of 19

In which scenarios could the GITHUB_TOKEN be used? (Choose two.)

  1. to leverage a self-hosted runner
  2. to create a repository secret
  3. to publish to GitHub Packages
  4. to create issues in the repo
  5. to read from the file system on the runner
  6. to add a member to an organization

Answer(s): C,D

Explanation:

The GITHUB_TOKEN is automatically provided by GitHub in workflows and can be used to authenticate API requests to GitHub, including publishing packages to GitHub Packages. The GITHUB_TOKEN is also used to authenticate API requests for actions like creating issues, commenting, or interacting with pull requests within the same repository.



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.)

  1. Store the token in a configuration file in a private repository. Use GitHub Actions to deploy the configuration file to the runtime environment.
  2. Store the token as a GitHub encrypted secret in the same repo as the code. Create a reusable custom GitHub Action to access the token by the microservice at runtime.
  3. Use a corporate non-GitHub secret store (e.g., HashiCorp Vault) to store the token. During deployment, use GitHub Actions to store the secret in an environment variable that can be accessed at runtime.
  4. Store the token as a GitHub encrypted secret in the same repo as the code. During deployment, use GitHub Actions to store the secret in an environment variable that can be accessed at runtime.
  5. Store the token as an organizational-level encrypted secret in GitHub. During deployment, use GitHub Actions to store the secret in an environment variable that can be accessed at runtime.

Answer(s): C,E

Explanation:

Using a corporate secret store like HashiCorp Vault provides a secure, centralized location for sensitive information. GitHub Actions can then retrieve and store the token securely during deployment by setting it as an environment variable, ensuring the token remains secure and accessible at runtime.

Storing the token as an organizational-level encrypted secret in GitHub ensures it is accessible across multiple repositories, minimizing management overhead. GitHub Actions can then use this secret during deployment by setting it as an environment variable, allowing the microservice to access it securely at runtime.



What is the minimal syntax for declaring an output named foo for an action?










Answer(s): C

Explanation:

The correct minimal syntax for declaring an output in GitHub Actions is by using the foo key under outputs, and associating it with a value (in this case, Some value). This is the simplest form to define an output in a workflow or action.



When reviewing an action for use, what file defines its available inputs and outputs?

  1. inputs.yml
  2. config.json
  3. defaults.json
  4. workflow.yml
  5. action.yml

Answer(s): E

Explanation:

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.



Page 3 of 19



Post your Comments and Discuss GitHub GitHub-Actions exam with other Community members:

Ian Hoskings commented on January 23, 2025
Hi I purchased the CKA exam and should have got the Github Actions exams as well. The Github exam is not downloading, can you advise please
UNITED KINGDOM
upvote