Closed danieeeld2 closed 7 months ago
Sorry, missed this message. Did you figure this out? Your code snippet looks fine.
Sorry, missed this message. Did you figure this out? Your code snippet looks fine.
Yes, I was misunderstanding what the teacher was asking us. I was trying to read secret variables in a github environment and that is only possible from github actions. Sorry for the confusion. Should I close the issue or do you close it?
I solved it by creating an actions that reads the variables and creates a local environment, and then using the code fragment referenced above.
I have a
Go 1.21
project, and I am usingKoanf
as configuration library. I have the configurationkey-values
in aYALM
file, but this file cannot be upload to github, because is not secure. Also, we have acirrus-test
in github, that tests the code before merge. As a consequence, we need some of thosekey-values
to instance the koanf configuration; so we decided to create some github secrets and try to read them, but we didn't achive it. We tried to create the secrets directly and, also, create an enviroment in github and, in it, the secrets; but the code doesn't recognise it. The code is the following:This is the code from the example EnvReadingExample When I do
k.Print()
, it is empty. Also, we changed the prefixLOGISTICSROUTES_
to""
and we saw that it is not reading the github variables.