From 258ff5d5e0f5b073cee7a785ae9e02e991427803 Mon Sep 17 00:00:00 2001 From: smorihira Date: Mon, 9 Sep 2024 15:14:13 +0900 Subject: [PATCH] fix: create constans of platforms --- hack/actions/gen/main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hack/actions/gen/main.go b/hack/actions/gen/main.go index 303777342bb..7dcd5d0769a 100644 --- a/hack/actions/gen/main.go +++ b/hack/actions/gen/main.go @@ -356,6 +356,11 @@ const ( buildkitSyftScanner = "buildkit-syft-scanner" ) +const ( + multiPlatforms = "linux/amd64,linux/arm64" + amd64Platform = "linux/amd64" +) + func (data *Data) initPullRequestPaths() { switch data.Name { // the benchmark components trigger each other, not just themselves @@ -445,10 +450,10 @@ func (data *Data) initData() { data.initPullRequestPaths() if data.AliasImage { - data.BuildPlatforms = "linux/amd64,linux/arm64" + data.BuildPlatforms = multiPlatforms } if data.ContainerType == CIContainer || data.Name == loadtest { - data.BuildPlatforms = "linux/amd64" + data.BuildPlatforms = amd64Platform } data.Year = time.Now().Year()