Which native method should you use to pass files between jobs within the same GitHub Actions workflow?
Answer(s): A
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.
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.
Answer(s): B,D,F
- 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?
Answer(s): B
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.
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?
Calling a reusable workflowYou 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>.usesYou 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.
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?
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 WorkflowYou 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.
https://docs.github.com/actions/managing-workflow-runs/disabling-and-enabling-a-workflow
Post your Comments and Discuss Microsoft GH-200 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the GH-200 content, but please register or login to continue.