Sha256: 217c5b8a6586a25dcb750bd7a734ba5713c63f802d05873b3b196417f37fafc7

Contents?: true

Size: 989 Bytes

Versions: 42

Compression:

Stored size: 989 Bytes

Contents

# https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-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
          # 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

        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

42 entries across 42 versions & 1 rubygems

Version Path
knapsack_pro-3.10.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.9.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.8.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.7.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.6.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.5.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.4.2 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.4.1 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.4.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.3.1 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.3.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.2.1 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.2.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.1.3 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.1.2 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.1.1 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.1.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-3.0.0 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-2.18.2 lib/knapsack_pro/config/ci/github_actions.rb
knapsack_pro-2.18.1 lib/knapsack_pro/config/ci/github_actions.rb