Practice Free GH-200 Exam Online Questions
As a DevOps engineer, you are developing a container action. You need to execute a cleanup script after completing the main script execution.
Which code block should be used to define the cleanup script?
A )

B)

C )

D )

- A . Option A
- B . Option B
- C . Option C
- D . Option D
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?
- A . runs: using: "composite"steps:- run: $GITHUB_ACTION_PATH/script.shdirectory: ${{ inputs.dir }}shell: bash
- B . runs: using: "composite"directory: ${{ inputs.dir }}steps:- run:
$GITHUB_ACTION_PATH/script.shshell: bash - C . runs: using: "composite"working-directory: ${{ inputs.dir }}steps:- run: $GITHUB_ACTION_PATH/script.shshell: bash
- D . runs: using: "composite"steps:- run: $GITHUB_ACTION_PATH/script.shworking-directory: ${{ inputs.dir }}shell: bash
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?
- A . POST /repos/: owner/: repo/actions/runs/: run_id
- B . GET /repos/: owner/: repo/actions/artifacts/logs
- C . GET /repos/: owner/: repo/actions/runs/: run_id/logs
- D . POST /repos/: owner/: repo/actions/runs/: run_id/logs
What is the right method to ensure users approve a workflow before the next step proceeds?
- A . creating a branch protection rule and only allow certain users access
- B . granting users workflow approval permissions
- C . adding users as required reviewers for an environment
- D . granting users repository approval permissions
Disabling a workflow allows you to stop a workflow from being triggered without having to delete the file from the repo.
In which scenarios would temporarily disabling a workflow be most useful? (Choose two.)
- A . A workflow sends requests to a service that is down.
- B . A workflow error produces too many, or wrong, requests, impacting external services negatively.
- C . A workflow is configured to run on self-hosted runners
- D . A workflow needs to be changed from running on a schedule to a manual trigger
- E . A runner needs to have diagnostic logging enabled.
Which workflow command would output the debug message "action successfully debugged" ?
- A . echo : debug:: message=action successfully debugged"
- B . echo "debug-action successfully debugged"
- C . echo ":: debug:: action successfully debugged"
- D . echo ": debug: action successfully debugged:"
How should you install the bats NPM package in your workflow?
A)

B)

C)

D)

- A . Option A
- B . Option B
- C . Option C
- D . Option D
A Scheduled workflows run on the:
- A . latest commit and branch on which the workflow was triggered .
- B . latest commit from the branch named schedule .
- C . latest commit from the branch named main .
- D . specified commit and branch from the workflow YAML file .
- E . latest commit on the default or base branch
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?
- 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.
In which locations can actions be referenced by workflows? (Choose three.)
- 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
