Pass the GitHub GitHub Certification GitHub-Actions Questions and answers with CertsForce

Viewing page 2 out of 3 pages
Viewing questions 11-20 out of questions
Questions # 11:

You need to trigger a workflow using the GitHub API for activity that happens outside of GitHub. Which workflow event do you use?

Options:

A.

check_suite


B.

workflow_run


C.

deployment


D.

repository_dispatch


Expert Solution
Questions # 12:

In which locations can actions be referenced by workflows? (Choose three.)

Options:

A.

a separate public repository


B.

an .action extension file in the repository


C.

the same repository as the workflow


D.

a published Docker container image on Docker Hub


E.

the runs-on: keyword of a workflow file


F.

the repository's Secrets settings page


G.

a public NPM registry


Expert Solution
Questions # 13:

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

Options:

A.

inputs.yml


B.

config.json


C.

defaults.json


D.

workflow.yml


E.

action.yml


Expert Solution
Questions # 14:

Which default environment variable specifies the branch or tag that triggered a workflow?

Options:

A.

GITHUB_TAG


B.

GITHUB_REF


C.

ENV_BRANCH


D.

GITHUB_BRANCH


Expert Solution
Questions # 15:

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

Options:

A.

Store the token in a configuration file in a private repository. Use GitHub Actions to deploy the configuration file to the runtime environment.


B.

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.


C.

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.


D.

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.


E.

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.


Expert Solution
Questions # 16:

What are the advantages of using a matrix strategy in a job definition? (Choose two.)

Options:

A.

It can test code in multiple versions of a programming language.


B.

It can decrease the costs for running multiple combinations of programming language/operating systems.


C.

It can run up to 512 jobs per workflow run.


D.

It can test code in multiple operating systems.


Expert Solution
Questions # 17:

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

Options:

A.

to leverage a self-hosted runner


B.

to create a repository secret


C.

to publish to GitHub Packages


D.

to create issues in the repo


E.

to read from the file system on the runner


F.

to add a member to an organization


Expert Solution
Questions # 18:

Your organization is managing secrets using GitHub encrypted secrets, including a secret named SuperSecret. As a developer, you need to create a version of that secret that contains a different value for use in a workflow that is scoped to a specific repository named MyRepo. How should you store the secret to access your specific version within your workflow?

Options:

A.

Create a duplicate entry for SuperSecret in the encrypted secret store and specify MyRepo as the scope.


B.

Create MyRepo_SuperSecret in GitHub encrypted secrets to specify the scope to MyRepo.


C.

Create a file with the SuperSecret. information in the .qithub/secrets folder in MyRepo.


D.

Create and access SuperSecret from the secrets store in MyRepo.


Expert Solution
Questions # 19:

As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?

As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?

Options:

A.

core.info('Something went wrong, but it\'s not bad enough to fail the build.')


B.

core.notice('Something went wrong, but it\’s not bad enough to fail the build.')


C.

core.warning('Something went wrong, but it\'s not bad enough to fail the build.')


D.

core.warn('Something went wrong, but it\'s not bad enough to fail the build.')


Expert Solution
Questions # 20:

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? (Choose two.)

Options:

A.

Create the group custom-software-on-linux and move the runner into the group.


B.

Inform users to identify the runner based on the group.


C.

Add the label custom-software to the runner.


D.

Configure the webhook and network to enable GitHub to trigger workflow.


E.

Add the label linux to the runner.


Expert Solution
Viewing page 2 out of 3 pages
Viewing questions 11-20 out of questions