Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
chore(github-action): modify addblob caching
Browse files Browse the repository at this point in the history
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
  • Loading branch information
o-orand committed Dec 27, 2023
1 parent 3252f34 commit 3e87c1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addblob.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 3e87c1e

Please sign in to comment.