Sha256: 4dd7500c97290513cd447e3612c8a443aa31ac69251968cedc0638121c11b17d

Contents?: true

Size: 479 Bytes

Versions: 31

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

class GithubService
  class << self
    GITHUB_OUTPUT = 'GITHUB_OUTPUT'

    def write_to_github_env(data)
      return unless data.is_a?(Hash)

      github_output = ENV.fetch(GITHUB_OUTPUT) { raise "#{GITHUB_OUTPUT} is not defined" }

      File.open(github_output, 'a') do |f|
        data.each { |(key, value)| f.puts("#{key}=#{value}") }
      end
    end

    def github_actions_exists?
      ENV['GITHUB_ACTIONS'].present?
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
uffizzi-cli-2.4.11 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.4.10 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.4.9 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.4.8 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.4.7 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.4.6 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.4.5 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.4.4 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.4.3 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.4.2 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.4.1 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.4.0 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.3.4 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.3.3 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.3.2 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.3.1 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.3.0 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.2.2 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.2.1 lib/uffizzi/services/github_service.rb
uffizzi-cli-2.2.0 lib/uffizzi/services/github_service.rb