include: ".gitlab-ci-common.yml"

stages:
  - build-nomyst
  - build-myst

nomyst:
  extends: .build_with_kaniko
  stage: build-nomyst
  variables:
    DOCKERFILE: Dockerfile
    BUILDTITLE: build-nomyst
    TAG_EXT: "-noMyST"
  environment:
    name: push-to-gitlab-project-registry

myst:
  extends: .build_with_kaniko
  stage: build-myst
  rules:
    - if: '$CI_COMMIT_TAG == "stable"'
      when: never
    - if: '$CI_COMMIT_TAG != null'
      when: always
  variables:
    DOCKERFILE: Dockerfile.myst
    BUILDTITLE: build-myst
    KANIKO_CACHE_ARGS: "--cache=false"
  environment:
    name: push-to-gitlab-project-registry
