title: How can Cloud Build take dynamic parameters to increment a registry tag?
body: <p>I want my Cloud Build  to push an image to a registry with an incremented tag. So, when the trigger arrives from GitHub, build the image, and if the latest tag was <code>1.10</code>, tag the new one <code>1.11</code>. Similarly, the <code>1.11</code> value will serve in multiple other steps in the build.</p>
  
  <p>Reading the registry and incrementing the tag is easy (in a bash Cloud Build step), but Cloud Build has no way to pass  parameters. (Substitutions come from outside the Cloud Build process, for example from the Git tags, and are not generated inside the process.)</p>
  
  <p><a href="https://stackoverflow.com/questions/52337831">This StackOverflow question</a> and <a href="https://medium.com/google-cloud/how-to-pass-data-between-cloud-build-steps-de5c9ebc4cdd" rel="nofollow noreferrer">this article</a> say that Cloud Build steps can communicate by writing files to the workspace directory. </p>
  
  <p>That is clumsy. But worse, this requires using shell steps  exclusively, not the native docker-building steps, nor the native <code>image</code> command. </p>
  
  <p>How can I do this?</p>