Created
October 30, 2020 19:11
-
-
Save zodman/55a0fac7e83deae3c1c8d5687993e303 to your computer and use it in GitHub Desktop.
store github secrets from env enviroment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from dotenv import dotenv_values | |
""" | |
# pip install python-dotenv | |
# using https://github.com/anomaly/github-secrets-cli | |
main.py .secretsenv org repo | bash | |
""" | |
def main(): | |
e =dotenv_values(dotenv_path=sys.argv[1]) | |
org = sys.argv[2] | |
repo = sys.argv[3] | |
for k,v in e.items(): | |
print(f'ghs secrets:set -s {k} -i {v} -o {org} -r {repo}') | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment