CI: simplify the logic for rebuilding the containers
right now the check_if_older_than_a_week rule does (in pseudo-code):
- get timestamp of current image or 0
- get timestamp of upstream image or 0
- if upstream image is newer than current image
copy upstream image into current
- if we are in a scheduled pipeline, or if there is no current image
(timestamp of 0), rebuild the current image
The ci-templates if-not-exists rule does:
- if there is a current image, exit
- if there is an upstream image, copy it to current and exit
- rebuild
Having the following is equivalent to the current behaviour and
can be used instead of check_if_older_than_a_week:
- if there is an upstream image, copy it to current and exit
- if there is a current image, exit
- rebuild
Because what matters is:
forks should be running the upstream image if available
forks should be running the latest upstream image in the libinput case
forks should be able to rebuild the images if there is no upstream
(change of the image tag)
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>