output

package
v0.3.0-rc.26 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package output provides helpers for outputting data to GitHub Actions and JSON.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(message string)

Error outputs a GitHub Actions error annotation.

func GitHubOutput

func GitHubOutput(key, value string) (err error)

GitHubOutput writes a key-value pair to GITHUB_OUTPUT for workflow consumption. In GitHub Actions, this file is used to pass outputs between steps.

func GitHubOutputMultiple

func GitHubOutputMultiple(outputs map[string]string) error

GitHubOutputMultiple writes multiple key-value pairs to GITHUB_OUTPUT.

func GitHubStepSummary

func GitHubStepSummary(content string) (err error)

GitHubStepSummary appends markdown content to the GitHub Actions step summary.

func JSON

func JSON(data interface{}) error

JSON outputs structured data as JSON to stdout. This is used with the --json flag for workflow consumption.

func Notice

func Notice(message string)

Notice outputs a GitHub Actions notice annotation.

func Result

func Result(data interface{}, textFn func()) error

Result outputs data either as JSON (if --json flag is set) or as human-readable text. The textFn is called to produce human-readable output when not in JSON mode.

func Warning

func Warning(message string)

Warning outputs a GitHub Actions warning annotation.

Types

type PlannedPromotion

type PlannedPromotion struct {
	Source  string `json:"source"`
	Target  string `json:"target"`
	SHA     string `json:"sha"`
	Version string `json:"version"`
}

PlannedPromotion represents a single planned promotion.

type PromotionPlanResult

type PromotionPlanResult struct {
	Promotions []PlannedPromotion `json:"promotions"`
	DryRun     bool               `json:"dry_run"`
}

PromotionPlanResult represents the output of the promote plan command.

type SetupResult

type SetupResult struct {
	HeadSHA          string            `json:"head_sha"`
	Version          string            `json:"version"`
	PreviousTag      string            `json:"previous_tag,omitempty"`
	ChangelogBaseSHA string            `json:"changelog_base_sha,omitempty"`
	RunBuilds        map[string]bool   `json:"run_builds,omitempty"`
	RunDeploys       map[string]string `json:"run_deploys,omitempty"` // "true", "false", or "pending"
	BaseSHAs         map[string]string `json:"base_shas,omitempty"`
}

SetupResult represents the output of the orchestrate setup command.

func (*SetupResult) WriteGHAOutput

func (r *SetupResult) WriteGHAOutput() error

WriteGHAOutput writes the setup result to $GITHUB_OUTPUT for workflow consumption.

Jump to

Keyboard shortcuts

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