steps:
- name: 'gcr.io/cloud-builders/docker'
  entrypoint: 'bash'
  args:
  - '-c'
  - |
    docker build -t "gcr.io/$PROJECT_ID/circlemator:$COMMIT_SHA" .

    if [ "$BRANCH_NAME" == "master" ]; then
      docker tag "gcr.io/$PROJECT_ID/circlemator:$COMMIT_SHA" gcr.io/$PROJECT_ID/circlemator:latest
    fi
images:
- 'gcr.io/$PROJECT_ID/circlemator'

Tag latest Docker image with :latest
Tag latest Docker image with :latest

When merging to master, release the image with the `latest` tag.

Cargo-culted from the helm-deploy repo.
