Create a new GitHub Action workflow to automate the process of building and pushing Docker images to Docker Hub with an emphasis on reducing image size. The workflow should include:
- Setting up GitHub Actions to build and push Docker images automatically.
- Optimizing the image size by switching from a
desktop-based image to a more lightweight core-based image.
- Utilizing best practices such as multi-stage builds, minimal base images, and stripping unnecessary layers.
- Ensuring that the optimized image retains full functionality and stability.
This implementation will enhance deployment efficiency and minimize resource consumption.