CI/CD with GitHub Actions · 12-day planAll days
Day 10 of 12 30 minGHCRbuild-pushTags
Build a container image in CI and publish it to the GitHub Container Registry. Log in with the GITHUB_TOKEN, generate tags from branches and version tags with the metadata action, build and push with Buildx, and speed it up with layer caching.
By the end of today you can
- Build a Docker image in a workflow
- Log in to the GitHub Container Registry with the GITHUB_TOKEN
- Grant the packages write permission needed to push
- Generate image tags from branches, commits and version tags
- Push only from trusted events, and cache image layers
What's inside
- 4 sections
- 2 diagrams and mind maps
- 1 code examples you can run
- 5-question quiz
- 1Build and push
- 2Permissions matter
- 3Using the image
- 4Speed: layer caching
Sign in free to read this lesson
Get the full lesson with diagrams, runnable code and the quiz. Your progress is saved across devices.
Sign in free