Skip to content

Commit

Permalink
fix: delete buildPlatforms func
Browse files Browse the repository at this point in the history
  • Loading branch information
smorihira committed Sep 9, 2024
1 parent 01022fe commit 51a2db4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions hack/actions/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 51a2db4

Please sign in to comment.