gha

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package gha provides functionality for working with GitHub Actions.

Index

Constants

This section is empty.

Variables

View Source
var WorkflowsPath = path.Join(".github", "workflows")

WorkflowsPath is the relative path to the GitHub Actions workflow directory.

Functions

This section is empty.

Types

type GitHubAction

type GitHubAction struct {
	// Owner is the GitHub user or organization that owns the repository that
	// houses the GitHub Action.
	Owner string

	// Project is the name of the GitHub repository (excluding the owner) that
	// houses the GitHub Action.
	Project string

	// Ref is the git ref (branch, tag, commit SHA), also known as version, of the
	// GitHub Action.
	Ref string
}

A GitHubAction identifies a specific version of a GitHub Action.

func JobActions added in v0.2.0

func JobActions(repo fs.FS, path, name string) ([]GitHubAction, error)

JobActions extracts the GitHub Actions used in the specified job in the specified workflow at the given file system hierarchy.

func RepoActions

func RepoActions(repo fs.FS) ([]GitHubAction, error)

RepoActions extracts the GitHub Actions used in the repository at the given file system hierarchy.

func WorkflowActions added in v0.2.0

func WorkflowActions(repo fs.FS, path string) ([]GitHubAction, error)

WorkflowActions extracts the GitHub Actions used in the specified workflow at the given file system hierarchy.

Jump to

Keyboard shortcuts

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