Annotations in action
In this section, we will leverage an existing script from the previous chapter to demonstrate adding annotations to a file in a pull request check run. We’re looking to clone this script and alter it to add an annotation to the third step within the script to add an annotation to the repository’s README
file. We’ll run and observe the different types of annotation levels and target sections or a line within a file.
Follow these steps to create an annotation on our README
file:
- Clone the script at
Chapter 8
/scratchpad/.github/workflows/build-create-check-in-step-part-three.yml
into thescratchpad
repository. - Change the workflow’s name to avoid a clash with other workflow runs (optionally, disable the workflows, as demonstrated in the previous chapter). I named my copy
create a check in a step with annotations
, but it doesn’t matter for this exercise. - Update the third step in the
steps
property in the workflow...