1
0
Fork 0

Exclude builder image

master
Ambrose Chua 2020-09-26 14:11:09 +08:00 committed by GitHub
parent aaab8e600b
commit 4738a14c42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -93,21 +93,21 @@ func subsetManifest(man *manifest.Manifest2822) *manifest.Manifest2822 {
entries := make([]manifest.Manifest2822Entry, 0, 1) entries := make([]manifest.Manifest2822Entry, 0, 1)
for _, entry := range man.Entries { for _, entry := range man.Entries {
hasWindows := false isWindows := false
for _, arch := range entry.Architectures { for _, arch := range entry.Architectures {
if strings.HasPrefix(arch, "windows") { if strings.Contains(arch, "windows") {
hasWindows = true isWindows = true
} }
} }
isBuilder := false isBuilder := false
for _, tag := range entry.Tags { for _, tag := range entry.Tags {
if strings.HasSuffix(tag, "builder") { if strings.Contains(tag, "builder") {
isBuilder = true isBuilder = true
} }
} }
if hasWindows || isBuilder { if isWindows || isBuilder {
continue continue
} }
entries = append(entries, entry) entries = append(entries, entry)