A GitHub Actions CI/CD workflow that automatically:
- Logs into Docker Hub
- Builds a Docker image from a Dockerfile
- Pushes the image to Docker Hub
The application itself is intentionally minimal. The main goal of this challenge was to practice automating container workflows using GitHub Actions.
The workflow is defined in: .github/workflows/docker-build-push.yml.
Key steps:
- Checkout repository code
- Set up Docker on the runner
- Log in to Docker Hub using GitHub Secrets
- Build the Docker image
- Push the image to Docker Hub (
mullah98/app:latest)
- How to set up a CI/CD pipeline in GitHub Actions to build and push Docker images.
- Using GitHub Secrets for credentials securely.
- Specifying the build context in
docker/build-push-actionwhen the Dockerfile is in a subfolder. - Verifying images both in Docker Hub and locally.
- Workflow failed initially because the Dockerfile was in a subfolder; solved by adding
context: ./challenge1-dockerin the build step. - Learned the difference between
varsandsecretsfor storing sensitive credentials.


