From 3e87c1e329c979bd660833b2a99d3cf586e68c49 Mon Sep 17 00:00:00 2001 From: Olivier ORAND Date: Wed, 27 Dec 2023 15:20:19 +0000 Subject: [PATCH] chore(github-action): modify addblob caching With dev release, blobs are not published, so we need to add dev blobs on each run. A non publish blobs is identified by is lack of object_id --- addblob.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addblob.sh b/addblob.sh index 685e28b9..f185f6c9 100755 --- a/addblob.sh +++ b/addblob.sh @@ -9,8 +9,9 @@ function addBlobOnChecksumChange() { src="$1" target="$2" blob_checksum=$(cat config/blobs.yml | yq .'"'${target}'"'.sha) + blob_object_id=$(cat config/blobs.yml | yq .'"'${target}'"'.object_id) # With dev release, blobs are not publish yet, so we need to add it again src_checksum=$(cat "${src}" | sha256sum | cut -d " " -f1) - if [ "${blob_checksum}" != "sha256:${src_checksum}" ]; then + if [ "${blob_checksum}" != "sha256:${src_checksum}" ] || [ "$blob_object_id" = "null" ]; then bosh add-blob ${src} ${target} else echo "skipping blob creation for ${target} with existing checksum: ${src_checksum}"