Moshe,
It's normally recommended not to check google-services.json into source control, unless you know that's secure for your purposes. You can instead provide the file at build time by creating or copying it into place using a script or gradle task that you write yourself.
There's no existing tools provided by Google that copy things from env vars, but that's something you could do yourself with your own plugin, as long as it injects that same Android resources that the google services plugin adds to your project. The plugin has its own documentation
here.
You could also get the values into your app some other way that's convenient for you, then pull them out at runtime and initialize Firebase using your own call to
FirebaseApp.initialzeApp(). In that case, you might also want to disable the FirebaseInitProvider that performs the default init using the values provided by the plugin.
Doug