How do I inject secrets and environment variables residing in my config.json to GitHub action in nodejs?
For instance
{
apiKey: "blablabla",
apiId: "anotherblabla"
}
How do I inject secrets and environment variables residing in my config.json to GitHub action in nodejs?
For instance
{
apiKey: "blablabla",
apiId: "anotherblabla"
}
Use github CLI and you get many options on how to inject secrets:
$ gh secret set MYSECRET
$ gh secret set MYSECRET --body "$ENV_VALUE"
$ gh secret set MYSECRET < myfile.txt
$ gh secret set MYSECRET --env myenvironment
$ gh secret set MYSECRET --org myOrg --visibility all
$ gh secret set MYSECRET --org myOrg --repos repo1,repo2,repo3
$ gh secret set MYSECRET --user
$ gh secret set MYSECRET --app dependabot
$ gh secret set -f .env