version: '1.0'
steps:

  build_image:
    type: build
    description: Building the image...
    dockerfile: Dockerfile
    image_name: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}
    tag: 'latest'

  push_to_registry_latest:
    title: Pushing to Docker Registry...
    type: push
    candidate: '${{build_image}}'
    tag: 'latest'

  push_to_registry:
    title: Pushing to Docker Registry...
    type: push
    candidate: '${{build_image}}'
    tag: ${{CF_BRANCH_TAG_NORMALIZED}}
