What approach should I take to store environment variables for a repo?
General Notes

I don't really understand this one:


  However, this seems clunky, as I have to create the logic to read this
  file in  every script that is made.


You can source all variables from a bash file in one line (source file-name.sh).  If they are "exported", you can pick them up in applications in any language you like (Java, python, or whatever), and most have built in syntax for doing it (like spring boot's SPEL syntax which lets you define your config to directly populate from environment variables automatically on start-up).

You can also make this export part of your ~/.bashrc file or whatever so it's auto sourced in your shell contexts, etc.

Repositories + CI/CD

This may depend on your repository and CI implementation more than the installed code.  For example, GitLab CI and GitHub Actions both support environment variables, as does Jenkins, etc.

In GitLab you can even go to your group level (above a bunch of related projects), and set per-environment environment variables there which are pushed into your deployment so you can use them in your installed code.  Then, you don't even need to store them in any extra files.

References:


https://docs.gitlab.com/ee/ci/variables/
https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables


Docker

Whatever your code is, you can probably bundle it into docker and pass the variables to the container at run time.