From 1975a08a3c12e6c7639ffcaa70d468a0011fd860 Mon Sep 17 00:00:00 2001 From: Alexander Wilms Date: Tue, 23 Jan 2024 13:07:32 +0000 Subject: [PATCH] Retry cpack until it succeeds --- .github/workflows/github.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index e54a027b2..592e15321 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -282,7 +282,7 @@ jobs: run: | cd '${{github.workspace}}/out/build/${{matrix.preset}}' CPACK_PATH=`which -a cpack | grep -m1 -v -i chocolatey` - "$CPACK_PATH" -C ${{matrix.pack_type}} ${{ matrix.cpack_args }} + counter=0; until "$CPACK_PATH" -C ${{matrix.pack_type}} ${{ matrix.cpack_args }} || ((counter > 20)); do sleep 3; ((counter++)); done test -f '${{github.workspace}}/CI/${{matrix.platform}}/post_pack.sh' \ && '${{github.workspace}}/CI/${{matrix.platform}}/post_pack.sh' '${{github.workspace}}' "$(ls '${{ env.VCMI_PACKAGE_FILE_NAME }}'.*)" rm -rf _CPack_Packages