Skip to content

Commit

Permalink
fix: create constans of platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
smorihira committed Sep 9, 2024
1 parent 3c40fe5 commit 258ff5d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions hack/actions/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 258ff5d

Please sign in to comment.