Skip to content

Commit

Permalink
add souls gh watch
Browse files Browse the repository at this point in the history
  • Loading branch information
POPPIN-FUMI committed Nov 9, 2021
1 parent dd00982 commit 2b3ad3e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion exe/souls
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions lib/souls/cli/github/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2b3ad3e

Please sign in to comment.