action

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeConfigInvalid            = "CONFIG_INVALID"
	CodeProjectUnsupported       = "PROJECT_UNSUPPORTED"
	CodeVersionNotFound          = "VERSION_NOT_FOUND"
	CodeVersionDowngradeBlocked  = "VERSION_DOWNGRADE_BLOCKED"
	CodeBuildFailed              = "BUILD_FAILED"
	CodeLPKInvalid               = "LPK_INVALID"
	CodePlatformNotFound         = "PLATFORM_NOT_FOUND"
	CodeImageCopyFailed          = "IMAGE_COPY_FAILED"
	CodeMirrorVerificationFailed = "MIRROR_VERIFICATION_FAILED"
	CodeReleaseAssetMissing      = "RELEASE_ASSET_MISSING"
	CodeStoreAuthFailed          = "STORE_AUTH_FAILED"
	CodeStorePublishFailed       = "STORE_PUBLISH_FAILED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	Host                 platform.Host
	ResultDir            string
	Logger               *slog.Logger
	LoadConfig           func(string) (config.Config, error)
	Inspect              func(context.Context, config.Project) (project.Info, error)
	SetVersion           func(string, string) (yamledit.Change, error)
	Build                func(context.Context, actionbuild.Request) (actionbuild.Result, error)
	CheckImages          func(context.Context, imageflow.Request) (imageflow.Result, error)
	WaitingReviewVersion func(context.Context, string) (string, bool, error)
	Publish              func(context.Context, publishflow.Request) (publishflow.Result, error)
}

func DefaultDependencies

func DefaultDependencies(host platform.Host) Dependencies

func DefaultDependenciesWithEnv added in v1.2.6

func DefaultDependenciesWithEnv(host platform.Host, getenv func(string) string) (Dependencies, error)

type Error

type Error struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Cause   error  `json:"-"`
}

func (*Error) Error

func (err *Error) Error() string

func (*Error) Unwrap

func (err *Error) Unwrap() error

type Input

type Input struct {
	Operation             Operation
	ConfigPath            string
	ImageID               string
	Version               string
	Tag                   string
	Channel               string
	Changelog             string
	LPKPath               string
	DownloadURL           string
	ExpectedSHA256        string
	EventName             string
	RefType               string
	RefName               string
	SourceDateEpoch       int64
	WorkflowToolchains    string
	WorkflowGoVersion     string
	WorkflowNodeVersion   string
	WorkflowRustToolchain string
	GuardOfficialReview   bool
	DryRun                bool
}

type Operation

type Operation string
const (
	OperationAuto            Operation = "auto"
	OperationCheck           Operation = "check"
	OperationBuild           Operation = "build"
	OperationPublishOfficial Operation = "publish-official"
	OperationPublishPrivate  Operation = "publish-private"
)

func ResolveOperation

func ResolveOperation(input Input, cfg config.Config) (Operation, error)

type Result

type Result struct {
	Operation             string          `json:"operation"`
	Changed               bool            `json:"changed"`
	PackageID             string          `json:"packageId"`
	PackageFile           string          `json:"packageFile"`
	ManifestFile          string          `json:"manifestFile"`
	Version               string          `json:"version"`
	Tag                   string          `json:"tag"`
	LPKPath               string          `json:"lpkPath"`
	SHA256                string          `json:"sha256"`
	DownloadURL           string          `json:"downloadUrl,omitempty"`
	ImageResults          json.RawMessage `json:"imageResults"`
	StoreResults          json.RawMessage `json:"storeResults"`
	UpdateStrategy        string          `json:"updateStrategy"`
	OfficialStoreEnabled  bool            `json:"officialStoreEnabled"`
	OfficialReviewPending bool            `json:"officialReviewPending"`
	OfficialReviewVersion string          `json:"officialReviewVersion,omitempty"`
	PrivateStoreEnabled   bool            `json:"privateStoreEnabled"`
	Channel               string          `json:"channel,omitempty"`
	ResultFile            string          `json:"resultFile"`
	RunnerArch            string          `json:"runnerArch"`
	TargetPlatform        string          `json:"targetPlatform"`
	Warnings              []lpkgo.Warning `json:"warnings,omitempty"`
}

func Run

func Run(ctx context.Context, input Input, dependencies Dependencies) (Result, error)

Jump to

Keyboard shortcuts

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