Free GH-200 Exam Braindumps
GitHub Actions Questions 46–50 (page: 11)

Updated On: 16-Nov-2026

Which native method should you use to pass files between jobs within the same GitHub Actions workflow?

  1. Use artifact storage.
  2. Use job outputs.
  3. Use the copy action with the cache parameter to cache the data.
  4. Use an external blob store

Answer(s): A

Explanation:

To pass files between jobs within the same GitHub Actions workflow, you should use workflow artifacts. Because each job runs on an entirely isolated runner/virtual machine, files do not persist naturally from one job to the next.
GitHub provides two native actions to implement this method:
1. Upload the File in the First JobUse the actions/upload-artifact action to upload the files or directories from your runner to GitHub's storage.
2. Download the File in the Second JobEnsure the second job waits for the first job to finish by using the needs key. Then, use the actions/download-artifact action to retrieve the file onto the new runner.


Reference:

https://docs.github.com/en/actions/tutorials/store-and-share-data



You have an organization-level self-hosted macOS runner that has the required Xcode toolchain installed. The runner is already configured and registered with your GitHub organization.
You need a workflow in Repo1 to run only on that runner and ensure that Repo1 is allowed to access the runner.
Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)
Note: Each correct answer is worth one point.

  1. Configure runs-on by using ${{ groups.<group-name> }} expressions.
  2. Configure runs-on with the runner group and the required runner labels.
  3. Reference only the default macOS label in the workflow.
  4. Use a custom label, such as xcode-required, on the self-hosted runner.
  5. Create separate runner groups for the macOS version and the Xcode version.
  6. Add the runner to a runner group that grants Repo1 access.

Answer(s): B,D,F

Explanation:

- Using both a runner group and labels ensures the job runs only on an eligible runner in the specified group.
- A custom label such as xcode-required identifies runners with the required Xcode toolchain.
- Runner group access policies control which repositories can use organization-level self-hosted runners.



When should you use an installation access token from a GitHub app in a GitHub Actions workflow?

  1. to act on behalf of a user and access their private repositories
  2. when the GITHUB_TOKEN secret lacks the permissions needed across multiple repositories or organizations
  3. to perform actions that require user consent, such as accessing private user data
  4. to authenticate as a GitHub app installation and access the resources in the app’s installed repository

Answer(s): B

Explanation:

The built-in GITHUB_TOKEN is limited to the repository containing the workflow. A GitHub App installation access token can provide fine-grained permissions to access additional repositories or organization resources where the app is installed.


Reference:

https://docs.github.com/en/enterprise-cloud%40latest/authentication/connecting-to-github-with-ssh/managing-d eploy-keys https://docs.github.com/en/enterprise-cloud@latest/apps/creating-github-apps/authenticating-with-a-github-app /making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow



Which of the following is a valid reusable workflow reference?

  1. uses: octo-org/another-repo/workflow.yml@v1
  2. uses: octo-org/another-repo/.github/workflows/workflow.yml@v1
  3. uses: another-repo/.github/workflows/workflow.yml@v1
  4. uses: another-repo/workflow.yml@v1

Answer(s): B

Explanation:

Calling a reusable workflow
You call a reusable workflow by using the uses keyword. Unlike when you are using actions within a workflow, you call reusable workflows directly within a job, and not from within job steps.
jobs.<job_id>.uses
You reference reusable workflow files using one of the following syntaxes:
*-> {owner}/{repo}/.github/workflows/{filename}@{ref} for reusable workflows in public and private repositories.
* ./.github/workflows/{filename} for reusable workflows in the same repository.


Reference:

https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows



You need to stop a GitHub Actions workflow from running. The solution must retain the configuration and execution history of the workflow.
What should you do?

  1. Delete the workflow YAML file from the repository.
  2. Select Actions and disable the workflow.
  3. Rename the workflow YAML file.
  4. Archive the workflow in a new branch.

Answer(s): B

Explanation:

To stop a GitHub Actions workflow while keeping its configuration file and execution history, you should disable the workflow rather than deleting it. Disabling a workflow prevents it from being triggered by any event (like pushes or schedules) but leaves the YAML file in your repository and preserves all previous run data on the GitHub Actions tab.
How to Disable a Workflow
You can disable a workflow through the GitHub UI, the CLI, or by modifying the code itself:
Via GitHub Web Interface:
Go to your repository on GitHub.
Click the Actions tab.
In the left sidebar, select the specific workflow you want to stop.
Click the three dots (...) or the Enable/Disable dropdown menu and select Disable workflow.


Reference:

https://docs.github.com/actions/managing-workflow-runs/disabling-and-enabling-a-workflow



Viewing page 11 of 28
Viewing questions 51 - 55 out of 134 questions


Post your Comments and Discuss Microsoft GH-200 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!