AZ-400 · Question #534
Hotspot Question You have a GitHub repository that contains a workflow named WF1. WF1 is used to build code for an app named App1. You need to add a build status badge to the README.md file in the rep
This question tests knowledge of the GitHub Actions workflow status badge URL format, which allows you to embed a build status image in a README.md file.
Question
Exhibit
Answer Area
- Repository ownerBadge typeBranch nameOrganization nameRepository nameRepository owner
- Repository nameBadge typeBranch nameOrganization nameRepository nameRepository owner
Explanation
This question tests knowledge of the GitHub Actions workflow status badge URL format, which allows you to embed a build status image in a README.md file.
Approach. The correct GitHub Actions badge URL format is: https://github.com/{owner}/{repository}/actions/workflows/{workflow_file}/badge.svg. For this scenario, the URL would be structured as: https://github.com/{OWNER}/{REPO}/actions/workflows/WF1.yml/badge.svg. The key segments are: the base GitHub URL, the repository owner/org name, the repository name, the 'actions/workflows' path segment, the specific workflow filename (e.g., WF1.yml), and finally 'badge.svg' as the endpoint that returns the status image. You can optionally append a branch parameter like '?branch=main' to show status for a specific branch.
Concept tested. GitHub Actions workflow status badge URL construction - specifically knowing the correct path structure (/actions/workflows/{workflow_file}/badge.svg) and how to reference a specific workflow by its YAML filename within a repository's README.md.
Topics
Community Discussion
No community discussion yet for this question.
