use as gitea action
Publish Action Image / build (push) Successful in 31s

This commit is contained in:
2026-06-29 16:01:01 +10:00
parent 4ee1b9e13c
commit 9adb5780f2
6 changed files with 236 additions and 248 deletions
+6
View File
@@ -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
+6
View File
@@ -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"`
}
// ------------------------------------------------------------