diff --git a/hasadna_k8s/github_pusher/cli.py b/hasadna_k8s/github_pusher/cli.py index fa3e3732..dc73370b 100644 --- a/hasadna_k8s/github_pusher/cli.py +++ b/hasadna_k8s/github_pusher/cli.py @@ -10,11 +10,15 @@ def main(): @main.command() @click.argument('EVENT_JSON') -def run(event_json): +@click.option('--file', is_flag=True) +@click.option('--env', is_flag=True) +def run(event_json, file, env): from . import main - if os.path.exists(event_json): + if file: with open(event_json) as f: event_json = f.read() + elif env: + event_json = os.environ[event_json] main.run(json.loads(event_json)) print("OK")