class GithubActions::Job
Github Actions job @see docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
Attributes
container[R]
matrix[R]
name[R]
runs_on[R]
steps[R]
workflow[R]
Public Class Methods
new(name, data, workflow)
click to toggle source
@param name [String] name of the job @param data [Hash] data from the workflow YAML file @param workflow [GithubActions::Workflow] the parent workflow
# File lib/tasks/github_actions/github_actions/job.rb, line 30 def initialize(name, data, workflow) @name = name @runs_on = data["runs-on"] @container = data["container"] @workflow = workflow @matrix = data.fetch("strategy", {})["matrix"] @steps = data["steps"].map do |step| Step.new(self, step) end end
Public Instance Methods
unsupported_steps()
click to toggle source
check if the defined steps can be used locally @return [Array<String>] the list of unsupported steps, returns empty
list if all actions are supported
# File lib/tasks/github_actions/github_actions/job.rb, line 45 def unsupported_steps steps.each_with_object([]) do |step, array| array << step.name unless step.supported? end end