Skip to content

ci-space/github-output

Repository files navigation

github-output

Godoc license

go get github.com/ci-space/github-output@v0.1.0

github-output - is simple GO library for writing values into $GITHUB_OUTPUT

Usage

Write single value

package main

import githuboutput "github.com/ci-space/github-output"

func main() {
	githuboutput.Write("name", "Ivan")
}

Write many values

package main

import githuboutput "github.com/ci-space/github-output"

func main() {
	githuboutput.WriteMap(map[string]string{
		"name": "Ivan",
		"last_name": "Ivanov",
    })
}

Write when output is available

package main

import githuboutput "github.com/ci-space/github-output"

func main() {
	githuboutput.WhenAvailable(func() error {
        return githuboutput.Write("key", "value")
	})
}