Class: KnapsackPro::Config::CI::GithubActions
- Defined in:
- lib/knapsack_pro/config/ci/github_actions.rb
Instance Method Summary collapse
- #branch ⇒ Object
- #commit_hash ⇒ Object
- #node_build_id ⇒ Object
- #node_index ⇒ Object
- #node_total ⇒ Object
- #project_dir ⇒ Object
- #user_seat ⇒ Object
Methods inherited from Base
Instance Method Details
#branch ⇒ Object
23 24 25 26 27 |
# File 'lib/knapsack_pro/config/ci/github_actions.rb', line 23 def branch # GITHUB_REF - The branch or tag ref that triggered the workflow. For example, refs/heads/feature-branch-1. # If neither a branch or tag is available for the event type, the variable will not exist. ENV['GITHUB_REF'] || ENV['GITHUB_SHA'] end |
#commit_hash ⇒ Object
19 20 21 |
# File 'lib/knapsack_pro/config/ci/github_actions.rb', line 19 def commit_hash ENV['GITHUB_SHA'] end |
#node_build_id ⇒ Object
14 15 16 17 |
# File 'lib/knapsack_pro/config/ci/github_actions.rb', line 14 def node_build_id # A unique number for each run within a repository. This number does not change if you re-run the workflow run. ENV['GITHUB_RUN_ID'] end |
#node_index ⇒ Object
10 11 12 |
# File 'lib/knapsack_pro/config/ci/github_actions.rb', line 10 def node_index # not provided end |
#node_total ⇒ Object
6 7 8 |
# File 'lib/knapsack_pro/config/ci/github_actions.rb', line 6 def node_total # not provided end |
#project_dir ⇒ Object
29 30 31 |
# File 'lib/knapsack_pro/config/ci/github_actions.rb', line 29 def project_dir ENV['GITHUB_WORKSPACE'] end |
#user_seat ⇒ Object
33 34 35 |
# File 'lib/knapsack_pro/config/ci/github_actions.rb', line 33 def user_seat ENV['GITHUB_ACTOR'] end |