cost

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 5 Imported by: 0

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

func BillableMinutes(d time.Duration) float64

BillableMinutes returns the billable minutes for a job duration. GitHub rounds each job's duration up to the nearest whole minute.

func IsSelfHosted

func IsSelfHosted(labels []string) bool

IsSelfHosted reports whether the labels indicate a self-hosted runner.

func LookupMultiplier

func LookupMultiplier(labels []string) float64

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

func ParseCoreCount(label string) int

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.

Jump to

Keyboard shortcuts

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