mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
fix logic in determining when to pull images
This commit is contained in:
parent
62608be10d
commit
49adae832e
1 changed files with 3 additions and 2 deletions
|
@ -53,12 +53,13 @@ func (runner *runnerImpl) addImageExecutor(action *model.Action, executors *[]co
|
||||||
pull := runner.config.ForcePull
|
pull := runner.config.ForcePull
|
||||||
if !pull {
|
if !pull {
|
||||||
imageExists, err := container.ImageExistsLocally(runner.config.Ctx, image)
|
imageExists, err := container.ImageExistsLocally(runner.config.Ctx, image)
|
||||||
|
log.Debugf("Image exists? %v", imageExists)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("unable to determine if image already exists for image %q", image)
|
return "", fmt.Errorf("unable to determine if image already exists for image %q", image)
|
||||||
}
|
}
|
||||||
|
|
||||||
if imageExists {
|
if !imageExists {
|
||||||
pull = false
|
pull = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue