Skip to content

Commit 278cef0

Browse files
committed
Fix base-image CI exiting early when update is needed
1 parent 6e8c2cf commit 278cef0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/actions/base_images/action.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ runs:
4545
# Enable running/building ARM64 images: https://github.com/multiarch/qemu-user-static
4646
sudo podman run --rm --privileged multiarch/qemu-user-static --reset -p yes
4747
IMAGES=()
48-
for IMAGE in base pulp-ci-centos9; do
49-
for ARCH in arm64 amd64; do
50-
echo "Checking if rebuild needed for ${IMAGE}:${ARCH}"
51-
podman run --pull=never pulp/${IMAGE}:ci-${ARCH} bash -c "dnf check-upgrade"
52-
if [ $? -gt 0 ]; then
53-
echo "Rebuild needed for ${IMAGE}:${ARCH}"
54-
IMAGES+=('${IMAGE}:${ARCH}')
55-
fi
56-
done
48+
for ARCH in arm64 amd64; do
49+
echo "Checking if rebuild needed for base:${ARCH} & pulp-ci-centos9:${arch}"
50+
if ! podman run --pull=never pulp/base:ci-${ARCH} bash -c "dnf check-upgrade"; then
51+
echo "Rebuild needed for base:${ARCH} & pulp-ci-centos9:${arch}"
52+
IMAGES+=('base:${ARCH}' 'pulp-ci-centos9:${ARCH}')
53+
elif ! podman run --pull=never pulp/pulp-ci-centos9:ci-${ARCH} bash -c "dnf check-upgrade"; then
54+
echo "Rebuild needed for just pulp-ci-centos9:${arch}"
55+
IMAGES+=('pulp-ci-centos9:${ARCH}')
56+
fi
5757
done
5858
if [ ${#IMAGES[@]} -eq 0 ]; then
5959
echo "No rebuilds needed :)"

0 commit comments

Comments
 (0)