Sync master back to dev. (#92)

* Fix if condition for upload-logs step (#87)

Previously the if condition was always evaluating to a truthy string
(e.g. 'false == "true"' or 'true == "true"') as the string comparison
(`== 'true'`) was not inside the expression syntax (`${{ }}`) and thus
being treated as a string rather than being evaluated.

* Introduce a force update value for reloading cache #82

---------

Co-authored-by: Leroy Hopson <github@leroy.geek.nz>
This commit is contained in:
Andrew Walsh 2023-02-03 23:15:56 -08:00 committed by GitHub
parent 0b1a3766c6
commit 3fb25be69a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,7 +77,11 @@ log "Creating cache key..."
normalized_versioned_packages="$(normalize_package_list "${versioned_packages}")"
log "- Normalized package list is '${normalized_versioned_packages}'."
value="${normalized_versioned_packages} @ ${version}"
# Forces an update in cases where an accidental breaking change was introduced
# and a global cache reset is required.
force_update_inc="0"
value="${normalized_versioned_packages} @ ${version} ${force_update_inc}"
log "- Value to hash is '${value}'."
key="$(echo "${value}" | md5sum | cut -f1 -d' ')"