I'm A GitHub newbie. I created a library that accesses an external service (OpenWeather API). The project also has a test project. Tests, to work, need a valid API key. The key is stored in an external file.
To keep my key secret, I only committed the template of this file:
{
"OpenWeatherApiKey": "YOUR_API_KEY_HERE"
}
I also created a dotnet.yml
action that build the project and run the tests
name: .NET
...
jobs:
build:
...
- name: Test
run: dotnet test --no-build --verbosity normal
The problem is that on my PC tests works, while on Github they fail because in the cfg. file stored there there's no the right key.
Is there a possibility to commit the file in GitHub with the right key without it being accessible to everyone and leave the template file public? This way everything would work on GitHub as well.