Skip to content

Commit e83005f

Browse files
committed
rebuild all if no changes found
1 parent 38ded3b commit e83005f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

main.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,14 @@ func scan(path string, finisher func(chan *build)) {
143143
dir := filepath.Dir(file)
144144
name := filepath.Base(dir)
145145
filename := filepath.Base(file)
146-
if _, found := changes[dir]; (!c.DiffOnly || found) && err == nil && filename == "Dockerfile" {
146+
147+
_, found := changes[dir]
148+
if len(changes) == 0 {
149+
log.Warn("No changes found, rebuilding all images.")
150+
found = true
151+
}
152+
153+
if (!c.DiffOnly || found) && err == nil && filename == "Dockerfile" {
147154
handleMatrix(name, builds)
148155
}
149156
return nil

0 commit comments

Comments
 (0)