Access environmental secrets in a python file

Hi,

I have a custom GitHub Action that is running a pytest command. This runs multiple Python files, but I need access to the GitHub environmental variables in the Python files. How do I do this?

Currently, I just have os.environ['SECRET_NAME'] to get the secret. This doesn’t work on GitHub.

Please could someone tell me how to fix this?

My repository if needed: GitHub - DillonB07/Dill_tils: DillonB07's utility functions