Handle fetching errors from GitHub registry (closes #442)

This commit is contained in:
lowlighter
2021-08-12 11:17:28 +02:00
parent 5c72a3c577
commit a6be52f198

View File

@@ -70,7 +70,10 @@ runs:
fi fi
METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG
echo "Using pre-built version $METRICS_TAG, will pull docker image from GitHub registry" echo "Using pre-built version $METRICS_TAG, will pull docker image from GitHub registry"
docker image pull $METRICS_IMAGE if ! docker image pull $METRICS_IMAGE; then
echo "Failed to fetch docker image from GitHub registry, will rebuild it locally"
METRICS_IMAGE=metrics:$METRICS_VERSION
fi
# Rebuild image # Rebuild image
else else
echo "Using an unreleased version ($METRICS_VERSION)" echo "Using an unreleased version ($METRICS_VERSION)"