actions

package
v0.0.0-...-3e74e49 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PreserveWorkspaceCredentialFiles

func PreserveWorkspaceCredentialFiles() (map[string]string, map[string]error)

PreserveWorkspaceCredentialFiles points credential-file variables that name a file in the job's workspace at a private copy outside it. Those tools write the file at the root of the workspace, and the variable reaches the container either already translated to the mounted workspace or still naming the runner path, which does not exist in here; in the second case the file of the same name at the root of GITHUB_WORKSPACE is used.

The file is copied out of the workspace rather than referenced in it: when the job has no checkout, the action clones the repository and replaces the workspace's contents, which would delete the credentials of the identity the rest of the run is meant to use. A variable naming a file outside the workspace is left alone, so a second call is a no-op.

It returns the variables it changed and, per variable, why a file it should have preserved was not; the caller reports those, since the clone that follows would otherwise remove the identity without a word.

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