Reader small image

You're reading from  GitHub Actions Cookbook

Product typeBook
Published inApr 2024
PublisherPackt
ISBN-139781835468944
Edition1st Edition
Concepts
Right arrow
Author (1)
Michael Kaufmann
Michael Kaufmann
author image
Michael Kaufmann

Michael Kaufmann believes that developers and engineers can be happy and productive at work. He loves DevOps, GitHub, Azure, and modern work. Microsoft has awarded him with the title Microsoft Regional Director (RD) and Microsoft Most Valuable Professional (MVP) – the latter in the category of DevOps and GitHub. Michael is also the founder and managing director of Xebia Microsoft Services, Germany – a consulting company that helps its customers become digital leaders by supporting them in their cloud, DevOps, and digital transformation. Michael shares his knowledge in books, training, and as a frequent speaker at international conferences.
Read more about Michael Kaufmann

Right arrow

Informing the user on details of your build and test results

In this recipe, we are going to decorate pull requests and workflow summaries with details of our test results. We’ll also add badges to the README file to indicate the quality of a branch or release.

Getting ready

Create a new branch to do the modification:

$ git switch -c add-badges

How to do it…

You can download badges for workflows using the following URL:

https://github.com/OWNER/REPO/actions/workflows/FILE.yml/badge.svg

You can also filter by branch or event by adding query parameters (for example, ?branch=main or ?event=push). We want a badge for the main branch, so add the following image to the markdown of your README:

![main](https://github.com/OWNER/package-recipe/actions/workflows/ci.yml/badge.svg?branch=main)

The badge will use the name in the workflow file and look like Figure 6.4 in the preview:

Figure 6.4 – Badge for the CI workflow

Figure 6.4 – Badge for the CI workflow

...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
GitHub Actions Cookbook
Published in: Apr 2024Publisher: PacktISBN-13: 9781835468944

Author (1)

author image
Michael Kaufmann

Michael Kaufmann believes that developers and engineers can be happy and productive at work. He loves DevOps, GitHub, Azure, and modern work. Microsoft has awarded him with the title Microsoft Regional Director (RD) and Microsoft Most Valuable Professional (MVP) – the latter in the category of DevOps and GitHub. Michael is also the founder and managing director of Xebia Microsoft Services, Germany – a consulting company that helps its customers become digital leaders by supporting them in their cloud, DevOps, and digital transformation. Michael shares his knowledge in books, training, and as a frequent speaker at international conferences.
Read more about Michael Kaufmann