As a developer, you want to review the step that caused a workflow failure and the failed step's build logs, First navigate to the main page of the repository on GitHub, Which section contains the step failure information?
Answer(s): C
To view a failed step and its build logs in GitHub Actions, you must navigate to the Actions section of your repository.The Actions tab is the dedicated space in any GitHub repository for managing, viewing, and debugging automated workflows. Clicking this tab allows you to see the history of all workflow runs, select the specific failed run, drill down into individual jobs, and expand the precise step that caused the error to read its execution logs.
https://blog.devgenius.io/devops-beginners-project-3-build-a-python-ci-cd-pipeline-with-github-actions-677635 9e096b
By default, which workflows can use an action stored in internal repository? (Each answer presents a complete solution. Choose two.)
Answer(s): B,D
Any actions or reusable workflows stored in the internal or private repository can be used in workflows defined in other internal or private repositories owned by the same organization, or by any organization owned by the enterprise.
https://docs.github.com/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise
You have a GitHub Actions workflow YAML file that contains the following lines.Which two statements accurately describe the behavior of the workflow? Each correct answer presents a complete solution.Note: Each correct selection is worth one point.
Answer(s): B,C
[C]By using the needs keyword, you create a sequential dependency. If the build job fails or is skipped, the publish-npm job will not run by default.In a GitHub Actions workflow, a job with the needs keyword will run only if the jobs it needs complete successfully or are skipped without an error. By default, if a dependency fails, the dependent job (in this case, publish-npm) is automatically skipped.To make the publish-npm job run even if the build job fails, you must use a conditional expression, such as if: always() or if: success() || failure().[B, not A]We see in the last line of code that an NPM token is used for authentication-Note:When publishing a Node.js package using GitHub Actions, the primary differences between using the npm registry and GitHub Packages involve authentication methods, registry configuration, and package naming requirements.Key Differences at a Glance*-> Authentication .For npm RegistryRequires a manually created npm token stored as a secretFor GitHub PackagesCan use the built-in GITHUB_TOKEN automatically provided by GitHub.
https://blog.anoff.io/2020-07-private-npm-package-github https://dev.to/gervaisamoah/introduction-to-github-actions-easy-guide-3p23
HOTSPOT (Drag and Drop is not supported)You have a GitHub repository named Repo1. Repo1 uses GitHub Actions workflows that upload build artifacts.You plan to change the artifact and log retention period to 30 days.You need to remove expired GitHub Actions artifacts from Repo1. The solution must explicitly identify and delete existing expired artifacts by using the REST API.How should you complete the script? To answer, select the appropriate options in the answer area.Note: Each correct selection is worth one point.Hot Area:
Answer(s): A
Box 1: GETGET retrieves the list of GitHub Actions artifacts without modifying them.Box 2: "/repos/$OWNER/$REPO/actions/artifacts"/repos/$OWNER/$REPO/actions/artifacts is the GitHub REST API endpoint for listing artifacts in a specific repository.The jq expression filters artifacts where expired == true, and the subsequent DELETE requests target their IDs.
For which type of GitHub Actions workflows should you use a self-hosted runner?
Answer(s): B
Self-hosted runners are primarily used for workflows that require specialized hardware, private network access, custom software configurations, or strict cost and security controls. While technically any standard GitHub Actions workflow can target a self-hosted runner, organizations deploy them to handle specific scenarios where standard GitHub-hosted runners fall short.Workflows Requiring Private Network AccessInternal Deployments: Workflows deploying code to internal servers, private databases, or environments tucked safely behind a corporate firewall.On-Premises Testing: Verification jobs that must interact with physical laboratory equipment or locally hosted APIs.VPN-Protected Infrastructure: Pipelines needing direct, secure access to private subnets inside AWS, Azure, Google Cloud, or local data centers without exposing ports to the public internet.Workflows with Custom Software & OS RequirementsLegacy System Builds: Automation requiring specialized operating systems, unique kernel versions, or specific distributions not offered by GitHub.Proprietary Tooling: Workflows that depend on expensive licensed commercial software, massive SDKs, or pre-configured local caching engines.Persistent Cache Pipelines: Large-scale builds (like heavy C++ or Android compilations) that benefit significantly from a persistent file system to avoid re-downloading gigabytes of dependencies for every single run.High-Performance & Custom Hardware WorkflowsMachine Learning Pipelines: Training workflows that demand dedicated, high-end physical GPUs.Large Compute Jobs: Resource-heavy builds requiring vast amounts of RAM, multiple CPU cores, or high disk I/O beyond what standard virtual cloud instances provide.
https://docs.github.com/actions/hosting-your-own-runners
Post your Comments and Discuss Microsoft GH-200 exam prep with other Community members: