From 2b3ad3ef9e87cda61e3921f48f3eb30cab3c1650 Mon Sep 17 00:00:00 2001 From: POPPIN-FUMI Date: Tue, 9 Nov 2021 19:23:59 +0100 Subject: [PATCH] add souls gh watch --- exe/souls | 2 +- lib/souls/cli/github/index.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/exe/souls b/exe/souls index ef857044..087420fd 100755 --- a/exe/souls +++ b/exe/souls @@ -5,7 +5,7 @@ begin souls_command = ARGV[0] require("./config/souls") unless ["new", "docker", "-v", "help", "", nil].include?(souls_command) rescue StandardError - raise(StandardError, "No confif! Please make `./config/souls.rb` File!") + raise(StandardError, "No config! Please make `./config/souls.rb` File!") end Souls::CLI.start diff --git a/lib/souls/cli/github/index.rb b/lib/souls/cli/github/index.rb index 65069547..2deb6cf3 100644 --- a/lib/souls/cli/github/index.rb +++ b/lib/souls/cli/github/index.rb @@ -22,6 +22,14 @@ def add_env Souls::Github.new.invoke(:secret_set) end + desc "watch", "Watch GitHub Actions Workflow" + def watch + run_id = `gh run list | grep Mailer | awk '{print $7}'`.strip + raise(StandardError, "No workflow is running.") if run_id.include?("push") + + system("gh run watch #{run_id}") + end + private def update_env_production(key:, value:, dqm: false)