From 5b8b15e7aa13569b67ba8155f0e994c23263a193 Mon Sep 17 00:00:00 2001 From: Yaksh Bariya Date: Thu, 14 Apr 2022 10:54:20 +0530 Subject: [PATCH] fixup(ci:upload): Treat failure to add debs to repository as error --- .github/workflows/packages.yml | 6 ++++-- scripts/aptly_api.sh | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index a46f2f70e..45f8fd503 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -214,7 +214,8 @@ jobs: # Publishing repository changes. if [ "$uploaded_files" = "true" ]; then - aptly_add_to_repo + if ! aptly_add_to_repo + exit 1 # Usually temporary directory is deleted automatically, but in certain cases it is left. aptly_delete_dir @@ -251,7 +252,8 @@ jobs: # Publishing repository changes. if [ "$uploaded_files" = "true" ]; then - aptly_add_to_repo + if ! aptly_add_to_repo + exit 1 # Usually temporary directory is deleted automatically, but in certain cases it is left. aptly_delete_dir diff --git a/scripts/aptly_api.sh b/scripts/aptly_api.sh index a8973485a..7cacbdc9f 100644 --- a/scripts/aptly_api.sh +++ b/scripts/aptly_api.sh @@ -78,7 +78,9 @@ aptly_add_to_repo() { fi else echo "[$(date +%H:%M:%S)] Error: got http_status_code == '$http_status_code', packages may not appear in repository." + return 1 fi + return 0 } aptly_publish_repo() {