Demo: publishing a tagged image on merge
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
publish an image to the registry when main changes. Prepares JNR-051-LAB1.
Draft outline details
Step by step
- Add a second workflow (or job) triggered by
pushtomain. - Log in to
ghcr.iowithGITHUB_TOKENand grantpackages: write. - Build and push
shop:<sha>andshop:latestor a version tag. - Enable branch protection with the
buildcheck required. - Planned mistake: print an environment variable that contains a secret with
echo; show it masked, then explain why you still never print secrets. - Open a PR with a failing test and show it cannot merge.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.