platform/.gitlab-ci.yml
2024-05-27 15:12:44 +01:00

22 lines
516 B
YAML

workflow:
rules:
- if: '$CI_COMMIT_BRANCH == "build"'
stages:
- build
default:
image: docker
services:
- docker:dind
before_script:
- "echo $CI_REGISTRY_PASSWORD | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin"
- "docker info"
buildAndPublish:
stage: build
variables:
IMAGE_NAME: "${CI_REGISTRY_IMAGE}"
script:
- "docker build . --tag ${IMAGE_NAME}:latest --tag ${IMAGE_NAME}:${CI_COMMIT_SHORT_SHA#'v'}"
- "docker push --all-tags $IMAGE_NAME"