Documentation
¶
Overview ¶
Package output provides helpers for outputting data to GitHub Actions and JSON.
Index ¶
- func Error(message string)
- func GitHubOutput(key, value string) (err error)
- func GitHubOutputMultiple(outputs map[string]string) error
- func GitHubStepSummary(content string) (err error)
- func JSON(data interface{}) error
- func Notice(message string)
- func Result(data interface{}, textFn func()) error
- func Warning(message string)
- type PlannedPromotion
- type PromotionPlanResult
- type SetupResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GitHubOutput ¶
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 ¶
GitHubOutputMultiple writes multiple key-value pairs to GITHUB_OUTPUT.
func GitHubStepSummary ¶
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.
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.