1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-11-23 21:44:44 +02:00

Fix netrc passing to clone image (#1964)

closes #1837
This commit is contained in:
Anbraten
2023-07-09 23:41:13 +02:00
committed by GitHub
parent a3b9cae759
commit f2c33a0d89
5 changed files with 15 additions and 13 deletions

View File

@@ -7,6 +7,7 @@ import (
backend_types "github.com/woodpecker-ci/woodpecker/pipeline/backend/types"
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/metadata"
yaml_types "github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml/types"
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml/utils"
"github.com/woodpecker-ci/woodpecker/shared/constant"
)
@@ -34,7 +35,7 @@ type Secret struct {
}
func (s *Secret) Available(container *yaml_types.Container) bool {
return (len(s.Match) == 0 || matchImage(container.Image, s.Match...)) && (!s.PluginOnly || container.IsPlugin())
return (len(s.Match) == 0 || utils.MatchImage(container.Image, s.Match...)) && (!s.PluginOnly || container.IsPlugin())
}
type secretMap map[string]Secret