Image tag by commit SHA

A commit SHA image tag identifies a container image using the Git commit that produced it. It makes releases traceable and allows an older image to be retrieved for rollback without depending on a moving tag such as latest.

Minimal example

yaml
tags: ghcr.io/yashdagar/zomato-api:${{ github.sha }}
push: true

Learn this concept

Lesson 7.3 · Gated CI image publishing

Used in exercises

Exercise 7.4 · Backend CI workflow Exercise 7.18 · Release rollback planner