Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.yaml to github secrets #60

Open
chboudry opened this issue Feb 27, 2023 · 0 comments
Open

config.yaml to github secrets #60

chboudry opened this issue Feb 27, 2023 · 0 comments

Comments

@chboudry
Copy link

chboudry commented Feb 27, 2023

It would be nice to add a script to avoid manually create the GH secrets.

here is what I am using :

gh auth login
repo="name/AzureTRE-Deployment"
env="CICD"
ghvar=$(cat ./config.yaml | grep ":" | grep -v -e '#' | grep -v -e ':$' | sed 's/ //g')
for fn in $ghvar; 
do 
	parameter=$(echo $fn |cut -d ":" -f 1)
	value=$(echo $fn |cut -d ":" -f 2)
	gh secret set $parameter -b $value --repo $repo  --env $env
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant