actions

package module
v0.1.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 3 Imported by: 0

README

GitHub / Actions

Installation: go get github.com/whiteducksoftware/golang-utilities/github/actions

Types & Functions

package actions

// Types
type GitHub struct {}   // represents the inputs which github provides us on default
type Message struct {}  // is a struct used for printing warning/error messages

// Functions
func SetOutput(name string, value string) {} // can be used to set the outputs of your action
func WriteDebug(message string) {}      // is used to write debug message to the github actions log
func WriteWarning(message Message) {}   // is used to write warning message to the github actions log
func WriteError(message Message) {}     // is used to write error message to the github actions log

func (g *GitHub) Load() error {}        // parses the environment vars and reads github options

func LoadOptions() (GitHub, error) {}   // parses the environment vars and reads github options 
                                        // Deprecated: Use GitHub.Load instead.

Documentation

Overview

Package actions contains utilities for working with github actions

Package actions contains utilities for working with github actions

Package actions contains utilities for working with github actions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetOutput

func SetOutput(name string, value string)

SetOutput can be used to set outputs of your action

func WriteDebug

func WriteDebug(message string)

WriteDebug is used to write debug message to the github actions log

func WriteError

func WriteError(message Message)

WriteError is used to write error message to the github actions log

func WriteWarning

func WriteWarning(message Message)

WriteWarning is used to write warning message to the github actions log

Types

type GitHub

type GitHub struct {
	Workflow           string `env:"GITHUB_WORKFLOW"`
	RunID              int16  `env:"GITHUB_RUN_ID"`
	JobID              string `env:"GITHUB_JOB"`
	Action             string `env:"GITHUB_ACTION"`
	Actor              string `env:"GITHUB_ACTOR"`
	Repository         string `env:"GITHUB_REPOSITORY"`
	Commit             string `env:"GITHUB_SHA"`
	EventName          string `env:"GITHUB_EVENT_NAME"`
	EventPath          string `env:"GITHUB_EVENT_PATH"`
	Ref                string `env:"GITHUB_REF"`
	RunningAsAction    bool   `env:"GITHUB_ACTIONS" envDefault:"false"`
	OperatingSystem    string `env:"RUNNER_OS"`
	TemporaryDirectory string `env:"RUNNER_TEMP"`
}

GitHub represents the inputs which github provides us on default

func LoadOptions

func LoadOptions() (GitHub, error)

LoadOptions parses the environment vars and reads github options Deprecated: Use GitHub.Load instead.

func (*GitHub) Load

func (g *GitHub) Load() error

Load parses the environment vars and reads github options

type Message

type Message struct {
	Message string
	File    string
	Line    string
	Col     string
}

Message is a struct used for printing warning/error messages

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL