Class: GithubActions::Tasks::Run
- Inherits:
-
Object
- Object
- GithubActions::Tasks::Run
- Includes:
- Colorizer
- Defined in:
- lib/tasks/github_actions/tasks/run.rb
Overview
run the requested Github Actions job locally
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
the requested job name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Run
constructor
constructor.
-
#run ⇒ Object
run the GitHub Action locally.
Methods included from Colorizer
#error, #info, #stage, #success, #warning
Constructor Details
#initialize(name) ⇒ Run
constructor
34 35 36 |
# File 'lib/tasks/github_actions/tasks/run.rb', line 34 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
the requested job name
30 31 32 |
# File 'lib/tasks/github_actions/tasks/run.rb', line 30 def name @name end |
Instance Method Details
#run ⇒ Object
run the GitHub Action locally
39 40 41 42 |
# File 'lib/tasks/github_actions/tasks/run.rb', line 39 def run runner = GithubActions::JobRunner.new(find_job, ENV["DOCKER_IMAGE"]) abort unless runner.run end |