Skip to content
Ameen Abozaid
Planned lessonJNR-051-L07

Demo: publishing a tagged image on merge

  • Lesson 7 of 7
  • Junior
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

  1. Add a second workflow (or job) triggered by push to main.
  2. Log in to ghcr.io with GITHUB_TOKEN and grant packages: write.
  3. Build and push shop:<sha> and shop:latest or a version tag.
  4. Enable branch protection with the build check required.
  5. Planned mistake: print an environment variable that contains a secret with echo; show it masked, then explain why you still never print secrets.
  6. Open a PR with a failing test and show it cannot merge.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.