workflow

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package workflow parses GitHub Actions workflow YAML to extract the external actions it references (the `uses:` clauses), without depending on a full YAML library — a focused regexp is sufficient and avoids a heavy dependency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSHA

func IsSHA(ref string) bool

IsSHA reports whether ref looks like a Git commit SHA rather than a tag or branch name.

Types

type ActionRef

type ActionRef struct {
	Owner   string // e.g. "actions"
	Repo    string // e.g. "checkout"
	Subpath string // e.g. "sub/path" for actions/checkout/sub/path@v3, else ""
	Ref     string // the pinned ref after '@': a tag, branch, or commit SHA
}

ActionRef is a single `uses:` reference to a Marketplace action.

func ParseActions

func ParseActions(content string) []ActionRef

ParseActions extracts every Marketplace action reference from workflow YAML, in document order, with duplicates removed.

Jump to

Keyboard shortcuts

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