This commit is contained in:
@@ -2,6 +2,7 @@ package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"kforge/pkg/interpolate"
|
||||
@@ -306,6 +307,11 @@ func ResolveEnvironment(cfg *KforgeConfig, envKey string) (ResolvedEnvironment,
|
||||
if imageTag == "" {
|
||||
imageTag = DefaultImageTag
|
||||
}
|
||||
// Allow the action entrypoint (or CI) to override the image tag at generate
|
||||
// time without modifying kforge.yml (e.g. KFORGE_IMAGE_TAG=abc1234).
|
||||
if override := os.Getenv("KFORGE_IMAGE_TAG"); override != "" {
|
||||
imageTag = override
|
||||
}
|
||||
image := registry.URL + "/" + registry.Repository + ":" + imageTag
|
||||
|
||||
replicas := *cfg.Defaults.Replicas
|
||||
|
||||
@@ -14,6 +14,12 @@ type KforgeConfig struct {
|
||||
Infrastructure InfrastructureConfig `yaml:"infrastructure"`
|
||||
Preview PreviewConfig `yaml:"preview,omitempty"`
|
||||
Environments map[string]EnvironmentConfig `yaml:"environments"`
|
||||
|
||||
// ActionRef is the Gitea Actions reference to this kforge installation
|
||||
// (e.g. "gitea.example.com/infra/kforge@main"). When set, kforge gitea-actions
|
||||
// and kforge gitea-preview generate workflows that call kforge as a reusable
|
||||
// action step instead of installing and running kforge inline.
|
||||
ActionRef string `yaml:"action_ref,omitempty"`
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user