when: branch: [main, high-performance] event: push matrix: SERVICE: - gateway - users - companies - job_seekers - customers - payments - employees - photographers - makeup_artists - tutors - developers - video_editors - graphic_designers - social_media_managers - fitness_trainers - catering_services - ugc_content_creators - cron steps: - name: build-and-push image: docker:24-cli environment: REGISTRY_USERNAME: from_secret: REGISTRY_USERNAME REGISTRY_PASSWORD: from_secret: REGISTRY_PASSWORD commands: - echo "${REGISTRY_PASSWORD}" | docker login docker-registry.registry.svc.cluster.local:5000 -u "${REGISTRY_USERNAME}" --password-stdin - docker build -f Dockerfile.simple --build-arg SERVICE_NAME=${SERVICE} -t docker-registry.registry.svc.cluster.local:5000/nxtgauge-rust-${SERVICE}:${CI_COMMIT_SHA} -t docker-registry.registry.svc.cluster.local:5000/nxtgauge-rust-${SERVICE}:latest -t docker-registry.registry.svc.cluster.local:5000/nxtgauge-rust-${SERVICE}:high-performance-latest . - docker push docker-registry.registry.svc.cluster.local:5000/nxtgauge-rust-${SERVICE}:${CI_COMMIT_SHA} - docker push docker-registry.registry.svc.cluster.local:5000/nxtgauge-rust-${SERVICE}:latest - docker push docker-registry.registry.svc.cluster.local:5000/nxtgauge-rust-${SERVICE}:high-performance-latest