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 ✗.
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.
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
0 of 1 goals done
Hint
Markdown pictures look like links with a! in front.Check
The rule is on. Two pull requests wait. Merge the one that is safe.
Hint
Open each pull request. Look at its checks.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.
Bahasa Melayu
Pull request Mei tunjuk ✗ merah di sebelah “CI / test”. Butang merge masih boleh ditekan. Apa patut anda buat?
✗ itu ialah status check (semakan status). Setiap job workflow laporkan satu: lulus, gagal, atau masih berjalan. Cari sebab yang ini gagal. Ketik langkah yang ada ✗.
Pasukan boleh jadikan semakan sebagai peraturan. Peraturan itu hidup, dan satu semakan gagal. Anda tekan merge. Apa jadi?
Jadikan ia peraturan untuk main. Hidupkan suis yang wajibkan semakan lulus.
Status badge (lencana status) ialah papan tanda kecil dalam README. Ia tunjuk sama ada workflow anda lulus. Tambah satu ! sebelum [CI]. Pautan itu jadi gambar.
! di depan.Peraturan itu dah hidup. Dua pull request menunggu. Merge yang selamat.
Kini anda boleh guna semakan untuk jaga main, dan tunjuk lencana.
You finished this before. Practice is always welcome!
Official docs: About status checks · Adding a workflow status badge · Available rules for rulesets
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?