World map

 

BM: Baca dalam Bahasa Melayu

World 7: Robots: Actions & CI/CD

Status checks and badges

You will learn: how checks guard your main branch, and how a badge shows them off.

The problem

Mei’s pull request shows a red ✗ next to “CI / test”. The merge button still works. What should you do?

Pick one answer.

Watch

That ✗ is a status check: The pass or fail mark a workflow puts on a commit or pull request.. Each workflow job reports one: passed, failed, or still running. Find out why this one failed. Tap the step with ✗.

Practice repo — not a real website
aina-codes / diary
CI #52
Failed pull_request on contact-page
Tap a step to see its log.
test

Predict

Teams can make checks a rule. With the rule on, a check fails. You press merge. What happens?

Pick one answer.

Try it

Make it a rule for main. Turn on the switch that requires checks to pass.

Practice repo — not a real website
aina-codes / diary
Rules for main

Try it

A status badge: A small picture in a README that shows if a workflow passes. is a little sign in your README. It shows if your workflow passes. Add one ! before [CI]. The link becomes a picture.

Turn the link into a badge picture.

Preview

My Diary

CI (opens in a new tab)

A tiny diary website.

0 of 1 goals done

Check

The rule is on. Two pull requests wait. Merge the one that is safe.

Practice repo — not a real website
aina-codes / diary

You did it!

You can now use checks to guard main, and show a badge.

Go deeper (optional)

These rules live in rulesets or branch protection. You pick which checks are required, by name. Add ?branch=main to a badge link to show only main’s status.