diff --git a/hack/actions/gen/main.go b/hack/actions/gen/main.go index 1f51be97500..51d955aff35 100644 --- a/hack/actions/gen/main.go +++ b/hack/actions/gen/main.go @@ -441,18 +441,15 @@ func (data *Data) setPullRequestPaths() { } } -func (data *Data) setBuildPlatforms() { +func (data *Data) initData() { + data.setPullRequestPaths() + if data.AliasImage { data.BuildPlatforms = "linux/amd64,linux/arm64" } if data.ContainerType == CIContainer || data.Name == loadtest { data.BuildPlatforms = "linux/amd64" } -} - -func (data *Data) initializeData() { - data.setPullRequestPaths() - data.setBuildPlatforms() data.Year = time.Now().Year() if maintainer := os.Getenv(maintainerKey); maintainer != "" { @@ -698,7 +695,7 @@ func main() { eg.Go(safety.RecoverFunc(func() error { data.Name = strings.TrimPrefix(name, "vald-") - data.initializeData() + data.initData() log.Infof("Generating %s's workflow", data.Name) workflow, err := data.generateWorkflowStruct()