Documentation
¶
Overview ¶
Package cost provides runner cost estimation for GitHub Actions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BillableMinutes ¶
BillableMinutes returns the billable minutes for a job duration. GitHub rounds each job's duration up to the nearest whole minute.
func IsSelfHosted ¶
IsSelfHosted reports whether the labels indicate a self-hosted runner.
func LookupMultiplier ¶
LookupMultiplier returns the billing multiplier for a set of runner labels. Self-hosted runners return 0 (free on GitHub billing). Checks each label against the known multiplier table, then larger-runner pattern matching, then an OS-prefix fallback. Returns 1.0 (Linux default) if nothing matches.
func ParseCoreCount ¶ added in v0.26.0
ParseCoreCount extracts a core count from a runner label. It understands both GitHub's split convention ("ubuntu-latest-16-cores") and the adjacent conventions used by GitHub docs and third-party vendors ("ubuntu-22.04-32core", "blacksmith-16vcpu-ubuntu-2404"). Returns 0 when the label carries no core information.
Types ¶
This section is empty.