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() {