repoconf

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package repoconf reads a repo's .github/runner-warden.yml, which lets a project pick the runner image its jobs run in:

image: ghcr.io/acme/ci:1          # every job in this repo
jobs:
  - match: ci.yml/android*        # workflow-file/job-name, path.Match globs
    image: ghcr.io/acme/android-ci:1

The first matching jobs entry wins, then image. The host decides which images are acceptable (linux.allowed_images).

Index

Constants

View Source
const Path = ".github/runner-warden.yml"

Path is where the file lives in a repo.

Variables

This section is empty.

Functions

func Allowed

func Allowed(img string, patterns []string) bool

Allowed reports whether img matches one of the host's glob patterns.

Types

type File

type File struct {
	Image string     `yaml:"image"`
	Jobs  []JobImage `yaml:"jobs"`
}

File is the parsed .github/runner-warden.yml.

func Parse

func Parse(b []byte) (*File, error)

Parse decodes and validates the file; an empty file means no settings. Unknown keys are errors so typos do not silently fall back to the default image.

func (*File) ImageFor

func (f *File) ImageFor(workflowFile, job string) string

ImageFor returns the image for a job, "" when the file names none.

type JobImage

type JobImage struct {
	Match string `yaml:"match"`
	Image string `yaml:"image"`
}

JobImage picks an image for jobs matching "workflow-file/job-name".

Jump to

Keyboard shortcuts

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