Sha256: a97807ab7634b340e9fb6faea2e69e4d2c58d9ff07f2ec358b569038a858fa98

Contents?: true

Size: 831 Bytes

Versions: 17

Compression:

Stored size: 831 Bytes

Contents

# https://help.github.com/en/articles/virtual-environments-for-github-actions#environment-variables
module KnapsackPro
  module Config
    module CI
      class GithubActions < Base
        def node_total
          # not provided
        end

        def node_index
          # not provided
        end

        def node_build_id
          # not provided
        end

        def commit_hash
          ENV['GITHUB_SHA']
        end

        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

        def project_dir
          ENV['GITHUB_WORKSPACE']
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
knapsack_pro-1.22.3 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.22.2 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.22.1 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.22.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.21.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.20.2 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.20.1 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.20.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.19.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.18.2 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.18.1 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.18.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.17.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.16.1 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.16.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.15.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-1.14.0 lib/knapsack_pro/config/ci/github_actions.rb