From the documentation we can substitution for pipeline environment variable.
Would it make sense to allow substitution from .env file like docker-compose?
It would allow to specify some build variable in one place that could be used by drone but also other tools…
The yaml is parsed before the code is cloned (which is not something that can be changed). This means it would not be possible to read an env file from your repository and substitute in the yaml, since the yaml would have already been parsed.