Skip to content

Commit

Permalink
More responsive UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
maramizo committed Mar 10, 2023
1 parent 34aa1a9 commit e837fc1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ghenv/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ def read_env_file() -> dict[str, str]:
return values


def upload_secret(repo: Repository, secret_name: str, secret_value: str):
def upload_secret(repo: Repository, secret_name: str, secret_value: str, debug_print=True):
repo.create_secret(secret_name, secret_value)
debug_print and print(f"✅ - {secret_name}")


def main(exit_on_failure=True) -> bool:
def main(exit_on_failure=True, debug_print=True) -> bool:
if not os.path.exists(".env"):
print("No '.env' file found at current directory. Exiting...")
exit_on_failure and exit(1)
Expand All @@ -52,7 +53,7 @@ def main(exit_on_failure=True) -> bool:
return False

for key, val in env_values.items():
upload_secret(repo, key, val)
upload_secret(repo, key, val, debug_print)

print(f"Created {len(env_values)} keys.")
return True

0 comments on commit e837fc1

Please sign in to comment.