[Feature Request] Trigger a deploy endpoint request data expansion

Hi @render!

I am not sure that it is the right topic for my feature request, but I give a change.

The POST /deploys endpoint is super useful, and it would be even much better if we could send build-time arguments (–build-arg) to build the image from Dockerfile. Currently we can only use environment variables as build arguments, but a feature like this could open a whole new world for us.

With that we can inject information into our applications.

Our use case:

  • we have a CI pipeline on GitHub Actions
  • we does deployments only after tag creation
  • we trigger deployments from the CI with the help of the POST /deploys endpoint
  • we would like to serve the version of our API service based on the current git tag
  • if we have the capability to POST the current git tag to the image building process through the endpoint
  • then we could use this service version information as an environment variable

This feature could cover a lot of use cases, this is why I think it is a reasonable feature request.

Proposal:

curl --request POST \
     --url https://api.render.com/v1/services/serviceId/deploys \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "clearCache": "do_not_clear",
     "buildArgs": {."version": "0.0.1" }
}
'

Thanks and best regards,
@stoiet