#100DaysOfDevOps - Day Forty - Eight Up until now, I had been tagging my Docker images in GitHub Actions using the workflow run number. It worked, but I wanted something more meaningful and more traceable. So today I moved toward using the Git commit hash as the image tag. What I worked on today: ✅ revisited why image tagging strategy matters ✅ moved from using the workflow run number to using github.sha ✅ explored GitHub Actions contexts and built-in variables ✅ checked commit hashes from both GitHub and git log ✅ learned why the full commit hash is too long to use directly ✅ extracted only the first few characters of the hash ✅ stored that shortened value as a workflow variable ✅ reused that variable across the image build, scan, and push stages ✅ observed how GitHub Actions automatically cleans up the runner after execution A better CI pipeline is not only about making it run but also about making its outputs easier to understand, track, and roll back when needed. I did hit another issue near the end around the backend image reference format, so there is still a bit of troubleshooting to finish. But overall, this was a strong step toward making the workflow more production-friendly. YouTube Video Link: https://lnkd.in/eM458884 #DevOps #100DaysOfDevOps #GitHubActions #Docker #ImageTagging #CICD #ContinuousIntegration #GitHub #Automation #CloudEngineering #LearningInPublic #TechdotSam

To view or add a comment, sign in

Explore content categories