From 8fb51b5e2e04891597bf45339ed1eb3add1a7726 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Fri, 12 Nov 2021 20:28:50 -0500 Subject: [PATCH] ci: maybe it's because of 5k dl limitation [skip ci] --- .github/workflows/maintenance/delete_ghcr_dangling_images.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maintenance/delete_ghcr_dangling_images.sh b/.github/workflows/maintenance/delete_ghcr_dangling_images.sh index 4b6ea32b..e2b74c1c 100755 --- a/.github/workflows/maintenance/delete_ghcr_dangling_images.sh +++ b/.github/workflows/maintenance/delete_ghcr_dangling_images.sh @@ -26,8 +26,10 @@ while read -r line; do id="$line" echo "Processing image $id" ## Workaround for https://github.com/cli/cli/issues/4286 and https://github.com/cli/cli/issues/3937 + set +e echo -n | gh api --method DELETE /users/${owner}/packages/container/${container}/versions/${id} --input - - echo Dangling image with ID $id deleted successfully + test $? -eq 0 && echo Dangling image with ID $id deleted successfully + set -e done <<< $ids_to_delete rm -rf $temp_file