## What Add a build job that builds the Docker image inside CI and tags it with the commit SHA. No push yet. ## Tasks - [x] Add job `build` with `needs: [lint, test]` - [x] Build image: `docker build -t ghcr.io/${{ github.repository }}/linux-sysmonitor:${{ github.sha }} .` - [x] Add `:latest` tag only when `github.ref == 'refs/heads/main'` - [x] Run `docker images` after build so tag is visible in logs ## Acceptance Criteria - [x] Build job only runs after both lint and test pass - [x] SHA tag in logs is the full 40-character commit hash - [x] `:latest` tag only appears on main branch builds - [x] Breaking the Dockerfile fails this job ## Commit `ci: add Docker build job with SHA tagging`
What
Add a build job that builds the Docker image inside CI and tags it with the commit SHA. No push yet.
Tasks
buildwithneeds: [lint, test]docker build -t ghcr.io/${{ github.repository }}/linux-sysmonitor:${{ github.sha }} .:latesttag only whengithub.ref == 'refs/heads/main'docker imagesafter build so tag is visible in logsAcceptance Criteria
:latesttag only appears on main branch buildsCommit
ci: add Docker build job with SHA tagging