Documentation
¶
Overview ¶
Package actions provides utilities for GitHub Actions workflows. It supports detecting the GitHub Actions environment and accessing paths to $GITHUB_OUTPUT, $GITHUB_ENV, $GITHUB_PATH, and $GITHUB_STEP_SUMMARY files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatData ¶
FormatData formats a map of key-value pairs for GitHub Actions. Keys are sorted alphabetically for consistent output. Empty values are preserved as key= entries per GitHub Actions specification.
func FormatValue ¶
FormatValue formats a single key-value pair for GitHub Actions. Uses key=value for single-line values and heredoc syntax for multiline values. The heredoc delimiter is ATMOS_EOF_<key> with collision detection to ensure the delimiter doesn't appear in the value content.
func GetEnvPath ¶
func GetEnvPath() string
GetEnvPath returns the path to $GITHUB_ENV file, or empty string if not set. GITHUB_ENV is used to set environment variables for subsequent workflow steps.
func GetOutputPath ¶
func GetOutputPath() string
GetOutputPath returns the path to $GITHUB_OUTPUT file, or empty string if not set. GITHUB_OUTPUT is used to pass outputs between workflow steps.
func GetPathPath ¶
func GetPathPath() string
GetPathPath returns the path to $GITHUB_PATH file, or empty string if not set. GITHUB_PATH is used to prepend directories to the system PATH for subsequent steps.
func GetSummaryPath ¶
func GetSummaryPath() string
GetSummaryPath returns the path to $GITHUB_STEP_SUMMARY file, or empty string if not set. GITHUB_STEP_SUMMARY is used to write job summary markdown.
func IsGitHubActions ¶
func IsGitHubActions() bool
IsGitHubActions returns true if running in GitHub Actions. It checks for the GITHUB_ACTIONS environment variable set by GitHub.
Types ¶
This section is empty.