refactored ci to use inheritance

2 jobs for 9-create-a-pipeline-to-build-and-publish-the-docker-image-in-gitlab-registry
in 1 minute and 15 seconds, using 0 compute credits, and was queued for 19 seconds