fix(backup): get-latest.sh, search for both .gz and .zstd (#858)

This commit is contained in:
Luigi Operoso 2023-06-25 15:48:36 +02:00 committed by GitHub
parent 3fe842fff4
commit 6cceedba77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -18,4 +18,4 @@ jobs:
with: with:
check_filenames: true check_filenames: true
ignore_words_list: aks,ags,startin ignore_words_list: aks,ags,startin
skip: "*.js,package-lock.json,*.lock,*/Font-Awesome/*,*.toml,*.svg,*assets/vendor/bootstrap*" skip: "*.js,package-lock.json,*.lock,*/Font-Awesome/*,*.toml,*.svg,*assets/vendor/bootstrap*,cert-manager.crds.yaml"

View File

@ -3,8 +3,8 @@
set -eo pipefail set -eo pipefail
[[ -z "${BACKUP_DIR}" ]] && echo "Required 'BACKUP_DIR' env not set" && exit 1 [[ -z "${BACKUP_DIR}" ]] && echo "Required 'BACKUP_DIR' env not set" && exit 1
# Search for all the tar.* inside the backup dir to support the migration between gzip vs zstd
latest=$(find ${BACKUP_DIR} -name '*.tar.zstd' -exec basename {} \; | sort -g | tail -n 1) latest=$(find ${BACKUP_DIR} -name '*.tar.*' -exec basename {} \; | sort -g | tail -n 1)
if [[ "${latest}" == "" ]]; then if [[ "${latest}" == "" ]]; then
echo "-1" echo "-1"