Skip to content

#3 - Title: ci: add Docker build job with SHA tagging #82

Description

@puneeth-grinds

What

Add a build job that builds the Docker image inside CI and tags it with the commit SHA. No push yet.

Tasks

  • Add job build with needs: [lint, test]
  • Build image: docker build -t ghcr.io/${{ github.repository }}/linux-sysmonitor:${{ github.sha }} .
  • Add :latest tag only when github.ref == 'refs/heads/main'
  • Run docker images after build so tag is visible in logs

Acceptance Criteria

  • Build job only runs after both lint and test pass
  • SHA tag in logs is the full 40-character commit hash
  • :latest tag only appears on main branch builds
  • Breaking the Dockerfile fails this job

Commit

ci: add Docker build job with SHA tagging

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions