outputs

package
v0.19.1221 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package outputs implements the action-output file grammar shared by the runner's action handler and the actions-supervisor. Both ends must agree on how a step's outputs file is written and parsed, so the grammar lives here rather than in either binary.

Index

Constants

View Source
const (

	// FilenameFormat is the per-step outputs filename, indexed by step index.
	FilenameFormat string = "%d.nuon-outputs.json"

	// MaxFileSize bounds how much of an action's outputs file the runner will
	// read, so a step can't exhaust runner memory by emitting an enormous file.
	MaxFileSize int64 = 1048576
)

Variables

This section is empty.

Functions

func Filename

func Filename(idx int64) string

Filename returns the outputs filename for a given step index.

func ParseFile

func ParseFile(path string) (map[string]interface{}, error)

ParseFile reads an outputs file and merges every line into a single map. A missing file is treated as empty output. An image-backed action shares this workspace, so the path is attacker-controlled: O_NOFOLLOW stops a symlink redirecting the read at host state, O_NONBLOCK stops a FIFO hanging the runner on open, and the fstat rejects anything but a regular file.

func ParseLine

func ParseLine(str string) (map[string]interface{}, error)

ParseLine parses a single outputs line. A line beginning with "{" is a JSON object; a top-level JSON array is unsupported; otherwise the line is a "key=value" pair.

Types

This section is empty.

Jump to

Keyboard shortcuts

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