steps:
  # Docker Build
  - name: 'gcr.io/cloud-builders/docker'
    args: ['build', '-t',
           'asia-northeast1-docker.pkg.dev/${_PROJECT_ID}/${_ARTIFACT_REPO_NAME}/axis:${_IMAGE_TAG}',
           '-f', '${_DOCKERFILE_PATH}',
           '.']

  # Docker Push
  - name: 'gcr.io/cloud-builders/docker'
    args: ['push',
           'asia-northeast1-docker.pkg.dev/${_PROJECT_ID}/${_ARTIFACT_REPO_NAME}/axis:${_IMAGE_TAG}']

substitutions:
  _IMAGE_TAG: latest # PushするImageのタグ
  _PROJECT_ID: <project_id> # ImageをPushするArtifact RegistryのGCP Project Id
  _ARTIFACT_REPO_NAME: sample # ImageをPushするArtifact RegistryのRepository Name
  _DOCKERFILE_PATH: build/Dockerfile # Git RepositoryにおけるDockerfileへのパス

options:
  logging: CLOUD_LOGGING_ONLY
