actions

package
v0.0.0-...-e8ada5f Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CICDConfig

type CICDConfig struct {
	Type   string `yaml:"type"`
	Config struct {
		Organization  string                 `yaml:"organization"`
		AuthToken     string                 `yaml:"auth-token"`
		Notifications CICDNotificationConfig `yaml:"notifications"`
	} `yaml:"config"`
}

CICDConfig represents the CI/CD section in server.yaml

type CICDNotificationConfig

type CICDNotificationConfig struct {
	Slack struct {
		WebhookURL string `yaml:"webhook-url"`
		Enabled    bool   `yaml:"enabled"`
	} `yaml:"slack"`
	Discord struct {
		WebhookURL string `yaml:"webhook-url"`
		Enabled    bool   `yaml:"enabled"`
	} `yaml:"discord"`
	Telegram struct {
		BotToken string `yaml:"bot-token"`
		ChatID   string `yaml:"chat-id"`
		Enabled  bool   `yaml:"enabled"`
	} `yaml:"telegram"`
}

CICDNotificationConfig represents notification configuration in server.yaml

type Executor

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

Executor handles GitHub Actions using only SC's internal APIs

func NewExecutor

func NewExecutor(prov provisioner.Provisioner, log logger.Logger, gitRepo git.Repo) *Executor

NewExecutor creates a new GitHub Actions executor using only SC's internal APIs

func (*Executor) CancelStack

func (e *Executor) CancelStack(ctx context.Context) error

CancelStack cancels a running stack operation using SC's internal APIs

func (*Executor) DeployClientStack

func (e *Executor) DeployClientStack(ctx context.Context) error

DeployClientStack deploys a client stack using SC's internal APIs

func (*Executor) DestroyClientStack

func (e *Executor) DestroyClientStack(ctx context.Context) error

DestroyClientStack destroys a client stack using SC's internal APIs

func (*Executor) DestroyParentStack

func (e *Executor) DestroyParentStack(ctx context.Context) error

DestroyParentStack destroys a parent stack using SC's internal APIs

func (*Executor) ProvisionParentStack

func (e *Executor) ProvisionParentStack(ctx context.Context) error

ProvisionParentStack provisions a parent stack using SC's internal APIs

type OperationConfig

type OperationConfig struct {
	Type        OperationType
	Scope       OperationScope
	StackName   string
	Env         string
	Version     string
	SkipRefresh bool
}

OperationConfig defines the configuration for a stack operation

type OperationScope

type OperationScope string

OperationScope defines whether this is a parent or client operation

const (
	ScopeParent OperationScope = "parent"
	ScopeClient OperationScope = "client"
)

type OperationType

type OperationType string

OperationType defines the type of operation

const (
	OperationDeploy    OperationType = "deploy"
	OperationProvision OperationType = "provision"
	OperationDestroy   OperationType = "destroy"
)

type ServerConfig

type ServerConfig struct {
	CICD CICDConfig `yaml:"cicd"`
}

ServerConfig represents the relevant parts of server.yaml

type SignalHandler

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

SignalHandler manages graceful shutdown and panic recovery for GitHub Actions operations

func NewSignalHandler

func NewSignalHandler(logger logger.Logger, prov provisioner.Provisioner) *SignalHandler

NewSignalHandler creates a new signal handler for GitHub Actions

func (*SignalHandler) CancelAllOperations

func (sh *SignalHandler) CancelAllOperations(ctx context.Context)

CancelAllOperations cancels all active operations (useful for global shutdown)

func (*SignalHandler) WithSignalHandling

func (sh *SignalHandler) WithSignalHandling(ctx context.Context, opType operationType, params interface{}, operation func(context.Context) error) error

WithSignalHandling wraps a GitHub Actions operation with signal handling and panic recovery

Jump to

Keyboard shortcuts

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