From 32538f7d1fcce2de74782d04c078393254fdcb64 Mon Sep 17 00:00:00 2001 From: Bernhard Ehlers Date: Sat, 30 Sep 2023 14:04:19 +0200 Subject: [PATCH] Docker build: Include time of pull request to calculation of change time --- .github/bin/docker_build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/bin/docker_build b/.github/bin/docker_build index 9aebe77..50ead82 100755 --- a/.github/bin/docker_build +++ b/.github/bin/docker_build @@ -62,9 +62,9 @@ import re import shlex import subprocess import time +import dateutil.parser import dxf import requests.exceptions -import dateutil.parser docker_login = {} image_info = {} @@ -379,7 +379,8 @@ def needs_rebuild(image, default_repository=None): rebuild_reason = "Files in docker context more recent than image" else: # clean git repository: use "git log" to get commit time - proc = subprocess.run(["git", "-C", image["dir"], "log", "-n", "1", + proc = subprocess.run(["git", "-C", image["dir"], "log", + "--show-pulls", "-n", "1", "--pretty=tformat:%ct", "--", "."], capture_output=True, check=True,