From 47ffead055afad1db0223660158a16c22807dc15 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Fri, 10 Sep 2021 19:02:21 +0300 Subject: [PATCH] github actions: ignore errors when adding deb files to aptly pool This should be safe. But if there real error occur, CI may finish with false "success" status and we will not know about the happened issue. --- .github/workflows/packages.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index e76e20338..500ea8992 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -222,7 +222,7 @@ jobs: --user "${{ secrets.APTLY_API_AUTH }}" \ --request POST \ --write-out "|%{http_code}" \ - https://packages.termux.org/aptly-api/repos/${REPOSITORY_NAME}/file/${REPOSITORY_NAME}-${{ github.sha }} + https://packages.termux.org/aptly-api/repos/${REPOSITORY_NAME}/file/${REPOSITORY_NAME}-${{ github.sha }} || true ) http_status_code=$(echo "$curl_response" | cut -d'|' -f2) @@ -235,17 +235,9 @@ jobs: echo "$warnings" echo fi - - # Upload directory is usually deleted automatically once all deb - # files were added without issues. Attempting to do this manually - # in case it left for some reason (e.g. some debs not added due to - # conflicts). - aptly_delete_dir - else - echo "[*] Server returned $http_status_code. Not publishing repository!" - aptly_delete_dir - exit 1 fi + # Usually temporary directory is deleted automatically, but in certain cases it is left. + aptly_delete_dir # Final part to make changes appear in web root. echo "[*] Publishing repository changes..."