github

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubJob

type GitHubJob struct {
	Name            string                 `yaml:"name,omitempty"`
	RunsOn          interface{}            `yaml:"runs-on"`
	Permissions     interface{}            `yaml:"permissions,omitempty"`
	Needs           interface{}            `yaml:"needs,omitempty"`
	If              string                 `yaml:"if,omitempty"`
	Steps           []GitHubStep           `yaml:"steps"`
	Env             map[string]string      `yaml:"env,omitempty"`
	Defaults        map[string]interface{} `yaml:"defaults,omitempty"`
	ContinueOnError bool                   `yaml:"continue-on-error,omitempty"`
	Container       interface{}            `yaml:"container,omitempty"`
	Services        map[string]interface{} `yaml:"services,omitempty"`
	Strategy        map[string]interface{} `yaml:"strategy,omitempty"`
	Outputs         map[string]string      `yaml:"outputs,omitempty"`
}

type GitHubPlatform

type GitHubPlatform struct{}

GitHubPlatform implements the Platform interface for GitHub Actions

func NewGitHubPlatform

func NewGitHubPlatform() *GitHubPlatform

NewGitHubPlatform creates a new GitHub Actions platform implementation

func (*GitHubPlatform) DetectWorkflows

func (gp *GitHubPlatform) DetectWorkflows(rootPath string) ([]string, error)

DetectWorkflows finds GitHub Actions workflow files

func (*GitHubPlatform) GetSecurityContext

func (gp *GitHubPlatform) GetSecurityContext(workflow *platform.Workflow) *platform.SecurityContext

GetSecurityContext extracts security-relevant information from a workflow

func (*GitHubPlatform) Name

func (gp *GitHubPlatform) Name() string

Name returns the platform name

func (*GitHubPlatform) ParseWorkflow

func (gp *GitHubPlatform) ParseWorkflow(path string) (*platform.Workflow, error)

ParseWorkflow parses a GitHub Actions workflow file

func (*GitHubPlatform) ValidateWorkflow

func (gp *GitHubPlatform) ValidateWorkflow(workflow *platform.Workflow) error

ValidateWorkflow validates a GitHub Actions workflow

type GitHubStep

type GitHubStep struct {
	Name             string                 `yaml:"name,omitempty"`
	ID               string                 `yaml:"id,omitempty"`
	If               string                 `yaml:"if,omitempty"`
	Uses             string                 `yaml:"uses,omitempty"`
	Run              string                 `yaml:"run,omitempty"`
	Shell            string                 `yaml:"shell,omitempty"`
	With             map[string]interface{} `yaml:"with,omitempty"`
	Env              map[string]string      `yaml:"env,omitempty"`
	ContinueOnError  bool                   `yaml:"continue-on-error,omitempty"`
	WorkingDirectory string                 `yaml:"working-directory,omitempty"`
}

type GitHubWorkflow

type GitHubWorkflow struct {
	Name        string                 `yaml:"name"`
	On          interface{}            `yaml:"on"`
	Env         map[string]string      `yaml:"env,omitempty"`
	Jobs        map[string]GitHubJob   `yaml:"jobs"`
	Permissions interface{}            `yaml:"permissions,omitempty"`
	Defaults    map[string]interface{} `yaml:"defaults,omitempty"`
}

GitHub Actions specific structures

Jump to

Keyboard shortcuts

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