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

Add option to filter secrets by plugins with specific tags (#4069)

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
6543
2024-08-31 13:46:50 +02:00
committed by GitHub
parent 99d169bd3f
commit fb6068d836
5 changed files with 140 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ func (s *Secret) Available(event string, container *yaml_types.Container) error
return fmt.Errorf("secret %q only allowed to be used by plugins by step %q", s.Name, container.Name)
}
if onlyAllowSecretForPlugins && !utils.MatchImage(container.Image, s.AllowedPlugins...) {
if onlyAllowSecretForPlugins && !utils.MatchImageDynamic(container.Image, s.AllowedPlugins...) {
return fmt.Errorf("secret %q is not allowed to be used with image %q by step %q", s.Name, container.Image, container.Name)
}