githubactions

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package githubactions provides a registry client for GitHub Actions.

Actions are git repositories on GitHub, so package metadata and tags come from the GitHub REST API. Unauthenticated requests are limited to 60 per hour. Subdirectory actions such as "github/codeql-action/init" share the repository of their first two path segments.

Index

Constants

View Source
const (
	DefaultURL = "https://api.github.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func New

func New(baseURL string, client *core.Client) *Registry

New creates a GitHub Actions registry client. baseURL is the GitHub REST API root; a GitHub Enterprise Server root ending in /api/v3 also sets the web URL used for repository pages and archive downloads.

func (*Registry) Ecosystem

func (r *Registry) Ecosystem() string

func (*Registry) FetchDependencies

func (r *Registry) FetchDependencies(_ context.Context, _, _ string) ([]core.Dependency, error)

func (*Registry) FetchMaintainers

func (r *Registry) FetchMaintainers(_ context.Context, _ string) ([]core.Maintainer, error)

func (*Registry) FetchPackage

func (r *Registry) FetchPackage(ctx context.Context, name string) (*core.Package, error)

func (*Registry) FetchVersions

func (r *Registry) FetchVersions(ctx context.Context, name string) ([]core.Version, error)

FetchVersions lists the repository's tags. Branches and commit SHAs are valid refs for an action but are not enumerated. Integrity is left empty because GitHub does not guarantee archive tarballs are byte-stable.

func (*Registry) URLs

func (r *Registry) URLs() core.URLBuilder

type URLs

type URLs struct {
	// contains filtered or unexported fields
}

func (*URLs) Documentation

func (u *URLs) Documentation(name, version string) string

func (*URLs) Download

func (u *URLs) Download(name, version string) string

Download returns the source tarball for a tag, branch or commit SHA. The tarball covers the whole repository, including for subdirectory actions.

func (*URLs) PURL

func (u *URLs) PURL(name, version string) string

func (*URLs) Registry

func (u *URLs) Registry(name, version string) string

Registry returns the repository page, at the given ref and subdirectory when either is set.

Jump to

Keyboard shortcuts

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