Class: GithubActions::Step
- Inherits:
-
Object
- Object
- GithubActions::Step
- Defined in:
- lib/tasks/github_actions/github_actions/step.rb
Overview
Github Actions step
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#job ⇒ Object
readonly
Returns the value of attribute job.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#run ⇒ Object
readonly
Returns the value of attribute run.
-
#uses ⇒ Object
readonly
Returns the value of attribute uses.
Instance Method Summary collapse
-
#initialize(job, step) ⇒ Step
constructor
constructor.
-
#supported? ⇒ Boolean
we can run the step if it is just a plain command (not a Javascript or Docker container action) and the environment variables do not contain any expansions (usually used for Github secrets).
Constructor Details
#initialize(job, step) ⇒ Step
constructor
30 31 32 33 34 35 36 |
# File 'lib/tasks/github_actions/github_actions/step.rb', line 30 def initialize(job, step) @job = job @name = step["name"] @uses = step["uses"] @run = step["run"] @env = step["env"] end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
25 26 27 |
# File 'lib/tasks/github_actions/github_actions/step.rb', line 25 def env @env end |
#job ⇒ Object (readonly)
Returns the value of attribute job.
25 26 27 |
# File 'lib/tasks/github_actions/github_actions/step.rb', line 25 def job @job end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
25 26 27 |
# File 'lib/tasks/github_actions/github_actions/step.rb', line 25 def name @name end |
#run ⇒ Object (readonly)
Returns the value of attribute run.
25 26 27 |
# File 'lib/tasks/github_actions/github_actions/step.rb', line 25 def run @run end |
#uses ⇒ Object (readonly)
Returns the value of attribute uses.
25 26 27 |
# File 'lib/tasks/github_actions/github_actions/step.rb', line 25 def uses @uses end |
Instance Method Details
#supported? ⇒ Boolean
we can run the step if it is just a plain command (not a Javascript or Docker container action) and the environment variables do not contain any expansions (usually used for Github secrets)
42 43 44 |
# File 'lib/tasks/github_actions/github_actions/step.rb', line 42 def supported? known_uses? && !expansion? end |