1
0
Fork 0
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:
Casey Lee 2019-03-18 16:50:23 -07:00
parent 62608be10d
commit 49adae832e

View file

@ -53,12 +53,13 @@ func (runner *runnerImpl) addImageExecutor(action *model.Action, executors *[]co
pull := runner.config.ForcePull
if !pull {
imageExists, err := container.ImageExistsLocally(runner.config.Ctx, image)
log.Debugf("Image exists? %v", imageExists)
if err != nil {
return "", fmt.Errorf("unable to determine if image already exists for image %q", image)
}
if imageExists {
pull = false
if !imageExists {
pull = true
}
}