output

package
v0.16.2-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 6 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 JSON

func JSON(data any) error

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

func Result

func Result(data any, 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.

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